-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.tmux.conf
More file actions
71 lines (54 loc) · 2.32 KB
/
.tmux.conf
File metadata and controls
71 lines (54 loc) · 2.32 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
### General configuration
# config reloads
#bind -r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# set the tmux shell used to fish
if '[ -f /usr/bin/fish ]' 'set -g default-shell /usr/bin/fish'
# load the tmuxline configuration
if-shell 'test -f ~/.tmuxline.sh' 'source ~/.tmuxline.sh'
# Set the TERM variable correctly
#set -g default-terminal "xterm-256color"
set-option -sg default-terminal "screen-256color"
set-option -sa terminal-overrides ",xterm-256color:RGB"
#set-option -sa terminal-features ",xterm-*:RGB"
# Shift window to left or right with CTRL+SHIFT+<L> or CTRL+SHIFT+<R>
# bind-key -n C-S-Left swap-window -t -1
# bind-key -n C-S-Right swap-window -t +1
bind-key -r H swap-window -t -1
bind-key -r L swap-window -t +1
# Enable mouse mode
set -g mouse on
# Click on session tab in top status bar to switch sessions
bind-key -T root MouseDown1Status if-shell -F '#{==:#{mouse_status_range},session}' 'switch-client -t =' 'select-window -t ='
### Configure tmux vi mode
# See: https://sanctum.geek.nz/arabesque/vi-mode-in-tmux/
# set movement to vi mode
setw -g mode-keys vi
# set v and y for copy mode for tmux v2.3 and below
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# switch panes via alt-arrow w/o prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# send the same command to all panes/windows/sessions
# Ctrl+B E
bind E command-prompt -p "Command:" \
"run \"tmux list-panes -a -F '##{session_name}:##{window_index}.##{pane_index}' \
| xargs -I PANE tmux send-keys -t PANE '%1' Enter\""
# send command to all panes in all windows of current session
# Ctrl+B Ctrl+e
bind C-e command-prompt -p "Command:" \
"run \"tmux list-panes -s -F '##{session_name}:##{window_index}.##{pane_index}' \
| xargs -I PANE tmux send-keys -t PANE '%1' Enter\""
### Plugin management
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# Plugin activation commands
# set -g @continuum-boot 'on'
# Initialize TMUX plugin manager
# NOTE: Keep this line at the very bottom of tmux.conf
run -b '~/.tmux/plugins/tpm/tpm'