]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - .tmux.conf
.tmux.conf: Shift+0-9 to select screens 10-19
[dotfiles.git] / .tmux.conf
1 # -------------------------------------------------------------------
2 # Settings
3 # -------------------------------------------------------------------
4 setw -g utf8 on # use UTF-8
5 set -g history-limit 15000 # increase scrollback lines
6 set -g default-command 'bash' # no login shell
7 set -g renumber-windows on # renumber windows sequentially after closing any of them
8 setw -g monitor-activity on # monitor for activity in windows
9 set -g visual-activity on # display status line message for windows with activity (monitor-activity)
10 set -g aggressive-resize on # smart window resizing when multiple attached clients
11 set -sg escape-time 50 # shorter Esc/Alt disambiguation timeout
12
13 # update program titlebar caption
14 set -g set-titles on
15 set -g set-titles-string '[#S:#I.#P #H] #W'
16
17 # status bar
18 set -g status-utf8 on
19 set -g status-style none
20 set -g status-left ''
21 set -g status-right '#[fg=blue]#(whoami)@#h (#S:#I.#P)'
22 setw -g window-status-style 'fg=brightblack'
23 setw -g window-status-current-style 'bg=brightblack,bold,fg=brightwhite'
24
25 # -------------------------------------------------------------------
26 # Key Bindings
27 # -------------------------------------------------------------------
28 # act like GNU screen
29 unbind C-b
30 set -g prefix C-a
31 bind-key a send-prefix
32 bind-key A command-prompt "rename-window %%"
33 bind-key C-a last-window
34 bind-key C new-window
35 bind-key c new-window -n 'sh' # new window w/ default title
36 bind-key C-c new-window -n 'sh' # (same as C-a c)
37 bind-key C-d detach # (same as C-a d)
38 bind-key C-n next-window # (same as C-a n)
39 bind-key C-p previous-window # (same as C-a p)
40 bind-key Escape copy-mode
41 unbind-key Space
42
43 # vim style movement
44 setw -g mode-keys vi
45 bind-key h select-pane -L
46 bind-key j select-pane -D
47 bind-key k select-pane -U
48 bind-key l select-pane -R
49 bind-key -r C-j resize-pane -D 1
50 bind-key -r C-k resize-pane -U 1
51 bind-key -r C-h resize-pane -L 1
52 bind-key -r C-l resize-pane -R 1
53
54 # intuitive window splitting
55 bind-key '|' split-window -h
56 bind-key '\' split-window -h
57 bind-key '-' split-window -v
58
59 # Shift+0-9 to select screens 10-19
60 bind-key ')' select-window -t :10
61 bind-key '!' select-window -t :11
62 bind-key '@' select-window -t :12
63 bind-key '#' select-window -t :13
64 bind-key '$' select-window -t :14
65 bind-key '%' select-window -t :15
66 bind-key '^' select-window -t :16
67 bind-key '&' select-window -t :17
68 bind-key '*' select-window -t :18
69 bind-key '(' select-window -t :19
70
71 bind R source-file ~/.tmux.conf