-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
57 lines (47 loc) · 1.71 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
# Activating Bash by default to set up proper prompt on new panes
set -g default-command bash
# Mouse mode
set -g mouse on
# Terminal colors in Tmux
set -g default-terminal "tmux-256color"
# Status bar
set -g status-position top
set -g base-index 1
set -g pane-base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
# Open panes in current directory
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Vi mode and bindings
setw -g mode-keys vi
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi V send -X select-line
bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'wl-copy'
# Even horizontal split
bind H select-layout even-horizontal
# Do a dts setup teardown
bind-key K \
if-shell -F "#{==:#{pane_current_command},nvim}" \
"send-keys :wqa C-m" "" \; \
if -F "#{>#{window_panes},1}" "kill-pane -a" \; \
run-shell "sleep 0.5 && \
remaining_pane=\$(tmux display-message -p #{pane_id}) && \
tmux send-keys -t \$remaining_pane \"docker compose stop\" C-m && \
sleep 0.5 && \
tmux send-keys -t \$remaining_pane \"clear\" C-m"
# Reload tmux config with a message
bind r display-message "tmux config reloaded!" \; source-file ~/.tmux.conf
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark'
set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'