-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
101 lines (75 loc) · 2.89 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
set -g default-terminal "screen-256color"
set -sa terminal-overrides ",xterm*:RGB"
# the only time indexing should ever start at 1
set -g base-index 1
# enable window renumbering
set-option -g renumber-windows on
# split panes using | and - for ver and hor respectively
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -l 15 -b -c "#{pane_current_path}"
unbind-key '"'
unbind-key %
# break pane from window: prefix + !
# re-join pane to window: prefix + "
bind-key '"' choose-window 'join-pane -t "%%"'
# resize panes using prefix + hjkl
unbind-key l
bind-key -r h resize-pane -L 10
bind-key -r j resize-pane -D 10
bind-key -r k resize-pane -U 10
bind-key -r l resize-pane -R 10
# mouse support
set -g mouse on
# auto set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# move status to centre
set -g status-justify centre
# vi like keys
set -g mode-keys vi
set -g status-keys vi
bind-key home choose-tree
# rebind <leader><C-l> to clear screen as vim-tmux-navigator uses bind
bind C-l send-keys 'C-l'
set -sg escape-time 0
# reload source file
unbind-key r
bind-key r source-file ~/.tmux.conf
## NOW USES VIM :Tmuxline as of 18-11-19
## statusline
#set -g status-interval 10
#set -g status-bg colour8
#set -g status-left '#[bg=colour208]#[fg=colour0]#{?client_prefix,#[bg=colour202],} # #S #[bg=colour8]#[fg=colour208]#{?client_prefix,#[fg=colour202],}▶#{?window_zoomed_flag, 🔍 ,}'
#set -g status-right '#(~/scripts/bash/battery.sh)#[fg=colour10]◀#[bg=colour10]#[fg=colour0] %b %d %H:%M '
#set -g window-status-current-format "#[fg=colour8]#[bg=colour10]▶#[fg=colour8]#[bg=colour10] #I|#[fg=colour0] #W #[fg=colour10]#[bg=colour8]▶"
#set -g window-status-format "#[fg=colour7]#[bg=colour8] #I|#[fg=colour7] #W"
# colors at https://i.stack.imgur.com/e63et.png
# load zsh 2020-04-14
set-option -g default-shell /bin/zsh
# load tmuxline snapshot from vim :TmuxlineSnapshot file 2020-03-25
if-shell "test -f ~/.tmux/tmuxline.conf" "source ~/.tmux/tmuxline.conf"
## for iTerm2 2020-05-15
setw -g aggressive-resize off
## plugin manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
run '~/.tmux/plugins/tpm/tpm'
# rebind-key prefix
# moved down 2022-06-29 as interfering with vim-tmux-navigator 'previous pane'
unbind-key C-b
unbind-key \\
bind-key \\ send-prefix
set -g prefix \\
## source tmuxline snapshot
source-file ~/.tmux/tmuxline-snapshot-2022-03-16.conf
#set -g window-style 'bg=color233'
#set -g window-active-style 'bg=color234'
# hex colours below for kanagawa theme 2024-06-25
set -g window-style 'bg=#141419'
set -g window-active-style 'bg=#17171e'
# resize panes relatively on screen resize (e.g. monitor change) 2024-01-04
set-hook -g client-resized resize-pane