aboutsummaryrefslogtreecommitdiff
path: root/tmux/tmux.conf
blob: 2acbb8354a3ef47e96e46f9aa24cfa8954d619dd (plain)
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
# Set terminal colors
set-option -sa terminal-overrides ",xterm*:Tc"

set-option -g status-style bg=default
set-option -g status-justify left
set-option -g status-left-length 50
set-option -g status-interval 2
set-option -g status-left '[ #[fg=white,bright]#h ] #[default]'
set-option -g status-right-length 80
set-option -g status-right '[ #($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load -a 1 --interval 2) | #{battery_percentage} #{battery_remain} | #[fg=white,bright]%m/%d %H:%M #[fg=default]]'
set-window-option -g window-status-current-format '#[fg=red,bg=default]( #[fg=white,bright,bg=default]#I:#W#[fg=red,nobright,bg=default] )#[fg=default]'

set -g mouse on
set -g base-index 1
set -g pane-base-index 1

# Map prefix to A
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

unbind %
bind | split-window -h 

unbind '"'
bind - split-window -v

set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

# vim-like pane switching
bind -r ^ last-window
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R

# vim-linke pane resizing
bind -r K resize-pane -U 5
bind -r J resize-pane -D 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
bind -r m resize-pane -Z

bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"

unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse

# List of plugins
set -g @tpm_plugins '           \
   tmux-plugins/tpm             \
   tmux-plugins/tmux-sensible   \
   tmux-plugins/tmux-resurrect  \
   thewtex/tmux-mem-cpu-load    \
   tmux-plugins/tmux-battery    \
'

run '$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm'