-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
33 lines (28 loc) · 1.24 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
set -g mode-keys vi
# shift-movement keys will resize panes
bind H resize-pane -L 10
bind L resize-pane -R 10
# Add truecolor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Default terminal is 256 colors
set -g default-terminal "screen-256color"
# Test colorscheme
# status bar
set-option -g status-style fg=colour2,bg=colour0 #yellow and base02
# pane border
set-option -g pane-border-style fg=colour0 #base02
set-option -g pane-active-border-style fg=colour2 #base01
# Copy - paste vim like
bind-key -T copy-mode-vi y send-keys -X copy-selection
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-option -g remain-on-exit on
bind-key r respawn-window
run-shell "powerline-daemon -q"
# Enable Tmux powerline statusline
source "/home/mq/.local/lib/python3.8/site-packages/powerline/bindings/tmux/powerline.conf"