forked from jsmestad/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
148 lines (122 loc) · 4.51 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
# improve colors
set -g default-terminal 'screen-256color'
# keybindings
unbind C-b
unbind C-a
unbind %
# unbind ,
# unbind .
# unbind n
# unbind p
unbind [
unbind '"'
unbind l
unbind &
unbind "'"
# unbind c
set-option -g prefix C-a # C-a for prefix just like screen
bind-key C-a last-window
bind-key | split-window -h
bind-key \ split-window -h
bind-key - split-window -v
bind-key x kill-pane
bind-key X kill-window
bind-key q confirm-before kill-session
bind-key Q confirm-before kill-server
# bind-key , previous-window # <
# bind-key . next-window # >
bind-key < swap-window -t :-
bind-key > swap-window -t :+
# bind-key n command-prompt 'rename-window %%'
bind-key N command-prompt 'rename-session %%'
bind-key Escape copy-mode -u
bind-key Up copy-mode -u
bind-key R refresh-client
bind-key a send-key C-a
bind-key C-j resize-pane -L 5
bind-key C-l resize-pane -R 5
bind-key C-k resize-pane -D 5
bind-key C-i resize-pane -U 5
bind-key c new-window -c "#{pane_current_path}"
# renumber windows
set-option -g renumber-windows on
## set status bar
set-option -g status-utf8 on
set-option -g status-bg colour11
set-option -g status-fg colour8
# status bar
set -g status-utf8 on
set -g status-bg black
set -g status-fg white
set -g status-left-length 40
set -g status-left '#[fg=yellow]#S ⧉ '
set -g status-right '#[fg=yellow]#(whoami)@#h'
#set-option -g status-left '⣿'
#set-option -g status-right '⡇ #[bold]❐ #S:#I#[default] ⡇ #[bold]#(whoami) ● #H#[default] '
#set-option -g status-right '⡇ ❐ #S ⡇ ❖ #(rvm tools identifier) ⡇ #(whoami) ● #H '
set-option -g status-left ' #[bold]❐ #S#[default] ⡇'
set-option -g status-right '#[bold]#(whoami) ● #H#[#(wemux status_users)] '
set-option -g status-right-length 60
set-option -g status-left-length 60
## highlight active window
set-window-option -g window-status-current-bg colour166
set-window-option -g window-status-current-fg colour15
set-window-option -g window-status-current-attr bold
set-window-option -g window-status-current-format ' #I #W '
## set window notifications
set-option -g visual-activity on
set-option -g visual-content on
set-window-option -g monitor-activity on
set-window-option -g automatic-rename off
## tmux window titling for X
set-option -g set-titles on
set-option -g set-titles-string '[#I] #W'
set-window-option -g automatic-rename on
set-window-option -g window-status-format ' #I #W '
set-window-option -g window-status-attr bold
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
## enable mouse
set-option -g mouse-select-pane on
set-window-option -g mode-keys vi
set-window-option -g mode-mouse on
set-window-option -g monitor-activity off
set-window-option -g monitor-content off
# set-option -g status-keys vi
# set-option -g history-limit 4096
set -g history-limit 262144
## pane border and colors
set-option -g pane-active-border-fg yellow
set-option -g pane-border-fg white
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
# set -g default-command $SHELL
# fix pasteboard
set-option -g default-command "reattach-to-user-namespace -l zsh; tmux rename-window zsh"
# This is so that each environment gets PATH and the like (plus the defaults
# from tmux) from the invoking shell, and NOT from the global tmux environment.
#set-option -g update-environment "PATH LESS GEM_PATH GEM_HOME DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# unbind t
# #T = standard window title (last command, see ~/.bash_profile)
# #h = short hostname
# #S = session name
# #W = tmux window name
# (would love to include #(pwd) here as well, but that would only print the
# current working directory relative to the session -- ie. always the starting
# cwd -- which is not very interesting)
set -g set-titles-string "#T : #h > #S > #W"
# dynamically update iTerm tab and window titles
set -g set-titles on
# mouse can be used to select panes
set -g mouse-select-pane on
# mouse can be used to select windows (by clicking in the status bar)
set -g mouse-select-window on
# mouse can be used to resize panes (by dragging dividers)
set -g mouse-resize-pane on
# not really sure what this does, but with it, the scrollwheel works inside Vim
set -g mouse-utf8 on
# allow mouse to enter copy mode and initiate selection
set -w -g mode-mouse on
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'