/
.tmux.conf
51 lines (39 loc) · 1.66 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
unbind C-b
set -g prefix C-a
bind-key a send-prefix
set-option -g default-terminal "screen-256color"
# Mouse support
set -g mouse on
set -g bell-action any
set -g base-index 1
set -g history-limit 100000
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
#setw -g c0-change-trigger 10
#setw -g c0-change-interval 250
# make home/end work in vim
bind-key -n End send-key C-e
bind-key -n Home send-key C-a
# Vi emulation
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
#bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# keep window numbers gapless
set -g renumber-windows
# paste entire history to file
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S - ; save-buffer %1 ; delete-buffer'
# From https://evantravers.com/articles/2021/02/05/curly-underlines-in-kitty-tmux-neovim/
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'egel/tmux-gruvbox'
set -g @shell_mode 'vi'
set -g @yank_selection 'primary'
set -g status-right '#{battery_status_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M '
run '~/.tmux/plugins/tpm/tpm'