-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
160 lines (129 loc) · 4.3 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Author: William H
# what to do if resurrect doesn't work properly
# https://github.com/tmux-plugins/tmux-continuum/issues/33
#
#
#
# derivative of Florian CROUZAT <[email protected]>
# http://files.floriancrouzat.net/dotfiles/.tmux.conf
# http://floriancrouzat.net/2010/07/compile-and-run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
#
#
# Also inspired by;
# https://mutelight.org/practical-tmux
# Binds {{{
# Prefix
# unbind C-b
set-option -g prefix C-b
set-option -g prefix2 C-a
#super cool apparently urxvt tab like window switching I got from the vulk guys
bind -n S-left prev
bind -n S-right next
bind -n C-left swap-window -t -1
bind -n C-right swap-window -t +1
# open new windows based on the directory the current highlighted window is in
bind c new-window -c "#{pane_current_path}"
bind a send-prefix
# Last active window
#unbind l
#bind C-a last-window
# hsplit
unbind %
bind | split-window -h -c "#{pane_current_path}"
# vsplit
unbind '"'
bind - split-window -v -c "#{pane_current_path}"
# Copy mode
bind Escape copy-mode
# Panes
#bind up resize-pane -U 10
#bind down resize-pane -D 10
#bind left resize-pane -L 10
#bind right resize-pane -R 10
bind tab next-layout
unbind C-o
bind r rotate-window
bind space select-pane -t:.+
# Monitor Activity
bind m set-window-option monitor-activity
# Commands
bind / command-prompt -p "man page: " "split-window 'exec man %%'"
bind s choose-session
# }}}
# Titles {{{
set-window-option -g automatic-rename on
# }}}
# Options {{{
# if you want your tmux window number to start later
#set-option -g base-index 1
set-option -g mouse on
set-option -g display-time 2000
set-option -g pane-active-border-fg blue
set-option -g pane-active-border-bg black
#set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"
set-option -g pane-border-fg white
set-option -g pane-border-bg black
#set-option -g default-shell /bin/bash
set-option -g default-command "exec /bin/bash"
set-option -g status-keys vi
set-option -g history-limit 100000
set -g history-file ~/.tmux_history
set-option -s escape-time 100
# make copy paste work
#set-option -g default-command "reattach-to-user-namespace -l bash"
#
# Or you can hold the option key, select and copy.- "George Liang"
# http://robots.thoughtbot.com/post/19398560514/how-to-copy-and-paste-with-tmux-on-mac-os-x
#
# More over you can hold shift on linuxs
# }}}
# Status Bar {{{
set-option -g status-interval 1
#set-option -g status-left '___'
set-option -g status-right "#T"
set-option -g status-justify left
set-option -g status-fg black
set-option -g status-left-length 20
# }}}
# Colors {{{
set-window-option -g mode-keys vi
set-window-option -g monitor-activity off
set-window-option -g window-status-current-bg yellow
set-window-option -g window-status-current-fg black
set-window-option -g window-status-bg green
set-window-option -g window-status-fg black
set-window-option -g clock-mode-colour yellow
# }}}
#
# SSH stuff that doesn't work :/ that I tried circa 11-2019 {{
# https://serverok.in/ssh-agent-forwarding-with-tmux
# https://stackoverflow.com/a/23187030/511710
# https://werat.github.io/2017/02/04/tmux-ssh-agent-forwarding.html
# https://gist.github.com/martijnvermaat/8070533#gistcomment-1317075
# https://superuser.com/questions/180148/how-do-you-get-screen-to-automatically-connect-to-the-current-ssh-agent-when-re/424588#424588
# set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
# }}
# List of plugins managed by tpm
# Supports `github_username/repo` or full git repo URLs
# NOTE!: follow up after setup and do
# ln -s $(pwd)/unison-with-dropbox-symlinked-to-linux/tmux_resurrect_backups $(pwd)/.tmux/resurrect
# to sync this folder in dropbox
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-urlview \
tmux-plugins/tmux-logging \
'
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
#
# Options for plugins
# bash history stuff disabled until I can make it not appear in my history and not update activity panes all the time
#set -g @resurrect-save-bash-history 'on'
set -g @continuum-restore 'on'
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run '~/.tmux/plugins/tpm/tpm'