-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
128 lines (110 loc) · 4.32 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
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# lower command delay
set -sg escape-time 0
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# vim motions
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind s split-window -v
bind v split-window -h
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# solarized colors
set-option -g pane-active-border-style fg=blue,bg=black
set-option -g pane-border-style bg=black
set-option -g status-style bg=blue,fg=white
# TODO: Figure out how to fix this in 2.9
#set-option -g status-attr default
# use 256 colors
set -g default-terminal 'screen-256color'
# disable mouse mode so copy/paste works
set -g mouse off
# number windows from 1, not 0
set -g base-index 1
# renumber windows when one is closed
set-option -g renumber-windows on
# hotkeys using alt/option as a modifier
bind-key -n M-n new-window -c "#{pane_current_path}"
bind-key -n M-1 select-window -t :1
bind-key -n M-2 select-window -t :2
bind-key -n M-3 select-window -t :3
bind-key -n M-4 select-window -t :4
bind-key -n M-5 select-window -t :5
bind-key -n M-6 select-window -t :6
bind-key -n M-7 select-window -t :7
bind-key -n M-8 select-window -t :8
bind-key -n M-9 select-window -t :9
bind-key -n M-0 select-window -t :0
bind-key -n M-. select-window -n
bind-key -n M-, select-window -p
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key -n M-X confirm-before "kill-window"
#bind-key -n M-- split-window -v -c "#{pane_current_path}"
#bind-key -n M-\ split-window -h -c "#{pane_current_path}"
#bind-key -n M-v split-window -h -c "#{pane_current_path}"
#bind-key -n M-V split-window -v -c "#{pane_current_path}"
bind-key -n M-R command-prompt -I "#W" "rename-window '%%'"
bind-key -n M-f resize-pane -Z
bind-key -n M-h select-pane -L
bind-key -n M-l select-pane -R
bind-key -n M-k select-pane -U
bind-key -n M-j select-pane -D
bind-key -n M-Left select-pane -L
bind-key -n M-Right select-pane -R
bind-key -n M-Up select-pane -U
bind-key -n M-Down select-pane -D
bind-key -n "M-H" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -L; tmux swap-pane -t $old'
bind-key -n "M-J" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -D; tmux swap-pane -t $old'
bind-key -n "M-K" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -U; tmux swap-pane -t $old'
bind-key -n "M-L" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -R; tmux swap-pane -t $old'
bind-key -n "M-S-Left" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -L; tmux swap-pane -t $old'
bind-key -n "M-S-Down" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -D; tmux swap-pane -t $old'
bind-key -n "M-S-Up" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -U; tmux swap-pane -t $old'
bind-key -n "M-S-Right" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -R; tmux swap-pane -t $old'
bind-key -n M-x confirm-before "kill-pane"
bind-key -n M-/ copy-mode
# linux system clipboard
#bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
#bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# macOS system clipboard
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
#bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"
set-option -g status-keys vi
set-option -g set-titles on
set-option -g set-titles-string 'tmux - #W'
set -g bell-action any
set-option -g visual-bell off
set-option -g set-clipboard off
setw -g mode-keys vi
setw -g monitor-activity on
# notifications
set -g visual-activity on
# statusbar
set -g status-style fg=colour15
set -g status-justify centre
set -g status-left ''
set -g status-right ''
set -g status-interval 1
set -g status-position top
set -g message-style fg=colour0,bg=colour3
setw -g window-status-current-style fg=blue,bold
setw -g window-status-current-format ' #W '
setw -g window-status-style fg=colour250
setw -g window-status-format ' #W '
setw -g window-status-bell-style fg=colour1