blob: 428a3849b31711be4cd983fe7e23661242e7a3a4 (
plain) (
blame)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g history-limit 50000
set -g focus-events on
set -s escape-time 0
set -g display-time 2000
set -g set-clipboard on
set -g mouse on
set -s extended-keys on
# WINDOW & PANE MANAGEMENT
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g detach-on-destroy off
setw -g aggressive-resize on
set -g main-pane-width 110
unbind C-b
set -g prefix M-a
bind M-a send-prefix
unbind C-h
unbind C-j
unbind C-k
unbind C-l
# PANE NAVIGATION
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# WINDOW SELECTION
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind 1 select-window -t 1
bind 2 select-window -t 2
bind 3 select-window -t 3
bind 4 select-window -t 4
bind 5 select-window -t 5
bind 6 select-window -t 6
# SPLITS & NEW WINDOW
bind -n M-$ split-window -h -c "#{pane_current_path}"
bind -n M-% split-window -v -c "#{pane_current_path}"
bind -n M-c new-window -c "#{pane_current_path}"
bind -n M-z resize-pane -Z
# Directory-specific plits (manual)
bind h split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# RESIZING
bind -r < resize-pane -L 10
bind -r > resize-pane -R 10
bind -r + resize-pane -D 10
bind -r - resize-pane -U 10
# WINDOW MOVEMENT
bind -n F11 previous-window
bind -n F12 next-window
bind -n C-S-Left swap-window -d -t -1
bind -n C-S-Right swap-window -d -t +1
# COPY MODE (VI STYLE)
set -g mode-keys vi
set -g status-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi C-v send -X begin-selection \; send -X rectangle-toggle
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xsel --clipboard"
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "xsel --clipboard"
# APPEARANCE & STATUS BAR
set -g status on
set -g status-interval 2
set -g status-position top
set -g status-justify centre
set -g status-style bg=#000000,fg=#8B7355
set -g status-left '#[fg=#D48B30,bold]#S '
set -g status-right '#[fg=#8B7355]%d.%m. #[fg=#D48B30]%H:%M'
set -g status-left-length 20
set -g status-right-length 20
set -g window-status-format "#[fg=#5A4A38]#I:#W"
set -g window-status-current-format "#[fg=#F0A030,bold](#I:#W)"
set -g window-status-separator " "
set -g pane-border-style fg=#241A10
set -g pane-active-border-style fg=#3D2B1A
set -g mode-style bg=#3D2B1A,fg=#C4A882
set -g message-style bg=#C84820,fg=#0D1117,bold
set -g message-command-style bg=#1F1610,fg=#D48B30
# SESSION & POPUPS
bind m choose-tree
bind k choose-session
bind N new-session
bind S command-prompt 'rename-session %%'
bind B command-prompt -p "New session name:" \
"new-session -d -s '%%'; move-window -t '%%:'; switch-client -t '%%'"
set -g popup-border-lines rounded
set -g popup-border-style fg=#3D2B1A
set -g popup-style bg=#0D1117
bind M-j display-popup -h 40% -w 40% -E "tmux-session-switcher"
bind M-o display-popup -E "tmux-zoxide-window"
bind M-t display-popup -E "tmux-bro"
bind M-f display-popup -h 70% -w 70% -E "tmux-file-picker"
bind M-r display-popup -h 70% -w 70% -E "tmux-file-picker -d"
bind M-g display-popup -h 70% -w 70% -E "tmux-file-picker -g"
bind M-d display-popup -h 70% -w 70% -E "tmux-file-picker --zoxide --dir-only"
bind M-z display-popup -h 70% -w 70% -E "tmux-file-picker --zoxide"
bind M-p display-popup -h 80% -w 80% -E "tmux-snaglord"
bind M-s set-window-option synchronize-panes
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
set -g @resurrect-capture-pane-contents 'on'
# reloading tmux
unbind r
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config Reloaded!"
# tmux plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-logging'
run '~/.tmux/plugins/tpm/tpm'
|