-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
102 lines (79 loc) · 3.08 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
# Color options
#set-option -g default-terminal "xterm-256color"
set-option -g default-terminal "tmux-256color"
set-option -sa terminal-overrides ',xterm-256color:RGB'
set -g mouse on
set-window-option -g monitor-activity on
set-option -g visual-activity on
set-option -sg escape-time 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
set-option -g prefix `
unbind-key `
bind ` send-prefix
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Original binding for backup: bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel
if-shell -b 'test -n "$WSLENV"' 'bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel clip.exe'
if-shell -b 'test -n "$WSLENV"' 'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel clip.exe'
# Splitting windows
bind "\\" split-window -h -c '#{pane_current_path}'
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind -n M-- split-window -v -c '#{pane_current_path}'
bind -n 'M-;' split-window -h -c '#{pane_current_path}'
# Don't ask to kill window
bind x kill-pane
# Cycle through sessions
bind '/' switch-client -n
bind -n S-Up switch-client -n
bind -n S-Down switch-client -p
# Moving around panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind t command-prompt -p 'Enter new session name:' "new-session -s '%%'"
bind -n M-i run-shell 'duckduckgo'
bind -n M-Left select-pane -L
bind -n M-Down select-pane -D
bind -n M-Up select-pane -U
bind -n M-Right select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -n M-n next-window
bind -n M-p previous-window
bind -n M-Enter new-window
bind -n M-x kill-pane
bind -n M-o kill-pane
# Move around windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Resizing panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
set-window-option -g mode-keys vi
# Make 'H' and 'L' match my vim motion
bind-key -T copy-mode-vi H send-keys -X start-of-line
bind-key -T copy-mode-vi L send-keys -X end-of-line
# u is for 'update'
bind u switch-client -t "work:notes"
# Formatting status bar.
# Taken from https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
#set -g status-right '#[fg=colour7,bg=colour5,bold] %a %Y-%m-%d #[fg=colour7,bg=colour4,bold] %H:%M '
set -g pane-active-border-style fg=colour6
set -g status-interval 30
set -g status-justify centre
set -g status-left '#[fg=colour7,bg=colour5,bold] Σ #S '
set -g status-left-length 20
set -g status-position bottom
set -g status-right ' REM: #(~/dotfiles/scripts/random_remind) | #(~/dotfiles/scripts/weatherblock.sh) #[fg=colour7,bg=colour5,bold] %a %Y-%m-%d #[fg=colour7,bg=colour4,bold] #(tmuxtime) '
set -g status-right-length 100
set -g status-style bg=colour0
set -g window-style 'bg=default'
set -g window-active-style 'bg=colour236'
setw -g window-status-current-format '#[fg=colour7,bg=colour4] #I #W#F '
setw -g window-status-format '#[fg=colour7] #I #W#F '