-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
124 lines (94 loc) · 3.76 KB
/
Copy path.tmux.conf
File metadata and controls
124 lines (94 loc) · 3.76 KB
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
# Keybinds
## Prefix keybinds
### Set Ctrl+A as another prefix binding
set prefix2 C-a
### Allow recursive prefix binds (accommodate nested tmux sessions)
bind-key a send-prefix
bind-key b send-prefix
## Bind 'r' as config reload
#bind r source-file ~/.tmux.conf
## Root keybinds (always active)
### Bind 'Alt+ArrowKeys' to move cursor between panes # ('M' is meta key, typically LeftAlt)
bind-key -T root M-Left select-pane -L
bind-key -T root M-Right select-pane -R
bind-key -T root M-Up select-pane -U
bind-key -T root M-Down select-pane -D
### Bind 'Ctrl+Alt+ArrowKeys' for directionally swapping panes locations
bind-key -T root C-M-Left select-pane -L \; select-pane -m \; select-pane -R \; swap-pane \; select-pane -M
bind-key -T root C-M-Right select-pane -R \; select-pane -m \; select-pane -L \; swap-pane \; select-pane -M
bind-key -T root C-M-Up select-pane -U \; select-pane -m \; select-pane -D \; swap-pane \; select-pane -M
bind-key -T root C-M-Down select-pane -D \; select-pane -m \; select-pane -U \; swap-pane \; select-pane -M
### Bind 'Shift+Alt+ArrowKeys' for directionally resizing panes dimensions
bind-key -T root S-M-Left resize-pane -L 2
bind-key -T root S-M-Right resize-pane -R 2
bind-key -T root S-M-Up resize-pane -U 2
bind-key -T root S-M-Down resize-pane -D 2
## Pane splitting keybinds
### Bind '"' and '%' (same as default), but add `-c` which inherits working directory.
bind '"' split-window -v -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
# Keyboard/mouse behaviors
## Timeouts
### Don't wait for further keys after 'Esc'
set -s escape-time 0
### Grace period after sending prefix for sending multiple keybinds
set repeat-time 700
## Mouse control
### Enable mouse control - this may conflict with mouse bindings from your terminal emulator
set mouse on
unbind-key -T root MouseDown1Pane # Disable "left click to activate pane" behavior
# Appearance
## Colors
### Enable 256 colors support
set -g default-terminal "tmux-256color"
### Visually highlight the active pane (slightly alter text/background colors)
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'
## Dimensions
### Constrain window size (to accommodate the smallest connected client) on a per-window basis, not a per-session basis
setw -g aggressive-resize on
## Status bar
### Enable status line
set status on
### Update status line every 5 seconds
set status-interval 5
### Window name reflects the currently running command
set automatic-rename-format "#(ps -f --no-headers --ppid $(tmux display-message -p #{pane_pid}) | awk '{ print substr($0, index($0,$8)) }') "
### Visually highlight the window ringing the bell
set-window-option monitor-bell on
### Set white backdrop, black text, no left-hand status
set status-bg colour7
set status-fg black
set status-left ""
### Limit the maximum status text length
set status-left-length 40
set status-right-length 40
# Window management
## Window indexing
### Index window numbers from 1 (skip 0)
set base-index 1
set pane-base-index 1
set renumber-windows on
### Re-index the first window as 1
move-window -t 1
## Window naming
### Automatically name windows when unspecified
set-window-option -g automatic-rename on
set-option -g set-titles on
### Rename the first window (at index 1) to 'main'
rename-window -t 1 main
# Session management
## Commands
### Default command to execute in new panes is `bash`
set-option -g default-command bash
## Persistence
### Don't destroy session when empty or unattached
set exit-unattached off
set destroy-unattached off
## History
### Set long scrollback history
set-option -g history-limit 10000
# Plugins
## tmux plugin manager
### Initialize tmux plugin manager - this should always be the last line
#run '~/.tmux/plugins/tpm/tpm'