-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_tmux.conf
More file actions
87 lines (64 loc) · 2.79 KB
/
dot_tmux.conf
File metadata and controls
87 lines (64 loc) · 2.79 KB
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
# -- general -------------------------------------------------------------------
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set -ag terminal-overrides ",xterm-ghostty:RGB"
set -g mouse on
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g escape-time 0
set -g history-limit 10000
set -g set-clipboard on
set -g focus-events on
set -g automatic-rename on
set -g allow-rename on
set -g status-position top
# -- keybindings ---------------------------------------------------------------
# splits (keep current path)
bind - split-window -v -c "#{pane_current_path}"
bind _ split-window -h -c "#{pane_current_path}"
# vim-style pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# pane resizing (repeatable)
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# swap windows left/right
bind -r < swap-window -t -1\; select-window -t -1
bind -r > swap-window -t +1\; select-window -t +1
# last active window
bind Tab last-window
# enter copy mode
bind Enter copy-mode
# zoom pane
bind + resize-pane -Z
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded"
# -- vi copy mode --------------------------------------------------------------
set -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# -- catppuccin ----------------------------------------------------------------
set -g @plugin 'catppuccin/tmux#v2.1.3'
set -g @catppuccin_flavor 'mocha'
# load catppuccin before setting status options
run '~/.tmux/plugins/tmux/catppuccin.tmux'
set -g @catppuccin_session_text " #(echo '#{session_name}' | sed 's/^agentdeck_//;s/_[^_]*$//')"
set -g status-left "#{E:@catppuccin_status_session}"
set -g status-right ""
# clear agent-deck session-level theme overrides
set-hook -g session-created "set -u status-style; set -u status-left; set -u status-right; set -u status-left-length; set -u status-right-length; set -u window-status-format; set -u window-status-current-format"
set-hook -g client-session-changed "set -u status-style; set -u status-left; set -u status-right; set -u status-left-length; set -u status-right-length; set -u window-status-format; set -u window-status-current-format"
# -- plugins (tpm) -------------------------------------------------------------
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'omerxx/tmux-sessionx'
set -g @sessionx-bind 's'
# auto-install tpm if missing
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
run '~/.tmux/plugins/tpm/tpm'