~charles/dotfiles

ref: f3d8c43ffc40a3ddf482a222c3399052aa6b2f4b dotfiles/overlay/.tmux.conf -rw-r--r-- 1.5 KiB
f3d8c43f — Charles Daniels gr ignore un-readable files 3 years ago
                                                                                
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
# remap prefix to grave
unbind-key C-b
set -g prefix `
bind-key ` send-prefix

# uncomment to force 256color mode
# set -g default-terminal "screen-256color"

# longer scrollback
set-option -g history-limit 20000

# enable scrollwheel
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M

# status bar configuration

# show clock in the bottom right
set -g status-right '%m-%d %H:%M:%S '

set -g mouse on

is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h"  "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j"  "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k"  "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l"  "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

# set statusbar colors
set -g status-bg black
set -g status-fg white
# highlight active window in red
set-window-option -g window-status-current-bg red

# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on

# Don't delay escape, because that's something that is done for some reason
set -sg escape-time 0