-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
122 lines (100 loc) · 6.03 KB
/
.tmux.conf
File metadata and controls
122 lines (100 loc) · 6.03 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
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
# ── Terminal & Colors ─────────────────────────────────────────────────────────
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",alacritty:RGB"
set -ga terminal-overrides ",*256col*:Tc"
# Undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# ── General ───────────────────────────────────────────────────────────────────
set -g default-shell /opt/homebrew/bin/fish
set -g mouse on
set -g history-limit 50000
set -g display-time 2000
set -sg escape-time 0
set -g repeat-time 600
set -g focus-events on
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g set-clipboard on
# ── Prefix: Ctrl-a ────────────────────────────────────────────────────────────
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# ── Reload config ─────────────────────────────────────────────────────────────
bind r source-file ~/.tmux.conf \; display "Config reloaded"
# ── Splits (intuitive: | and -) ───────────────────────────────────────────────
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# ── Pane navigation (vim-style) ───────────────────────────────────────────────
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# ── Pane resizing ─────────────────────────────────────────────────────────────
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
# ── Window navigation ─────────────────────────────────────────────────────────
bind -r p previous-window
bind -r n next-window
bind Tab last-window
# ── Copy mode (vim bindings) ──────────────────────────────────────────────────
set -g mode-keys vi
bind Enter copy-mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi Escape send -X cancel
# ── Smart window renaming ─────────────────────────────────────────────────────
# When pane is idle at shell, show the current directory (basename)
# When a command is running, show the command name with smart aliases
set -g automatic-rename on
set -g automatic-rename-format '#{?#{==:#{pane_current_command},fish},#{b:pane_current_path},#{pane_current_command}}'
# ── Alacritty title bar sync ──────────────────────────────────────────────────
# Updates macOS title bar: session › window_name
set -g set-titles on
set -g set-titles-string "#{session_name} › #{window_name}"
# ── Catppuccin Mocha status bar ───────────────────────────────────────────────
set -g status on
set -g status-position bottom
set -g status-interval 2
set -g status-style "bg=#1e1e2e,fg=#cdd6f4"
# Left: session name
set -g status-left-length 40
set -g status-left "#[bg=#cba6f7,fg=#1e1e2e,bold] #{session_name} #[bg=#1e1e2e,fg=#cba6f7]"
# Right: date | time
set -g status-right-length 80
set -g status-right "#[fg=#313244]#[bg=#313244,fg=#bac2de] %a %d %b #[bg=#313244,fg=#89b4fa]#[bg=#89b4fa,fg=#1e1e2e,bold] %H:%M #[bg=#1e1e2e,fg=#89b4fa]"
# Window tabs — inactive
set -g window-status-format "#[fg=#313244]#[bg=#313244,fg=#6c7086] #I #{window_name} #[bg=#1e1e2e,fg=#313244]"
# Window tabs — active
set -g window-status-current-format "#[fg=#89b4fa]#[bg=#89b4fa,fg=#1e1e2e,bold] #I #{window_name} #[bg=#1e1e2e,fg=#89b4fa]"
set -g window-status-separator ""
# Pane borders
set -g pane-border-style "fg=#313244"
set -g pane-active-border-style "fg=#89b4fa"
# Message / command bar
set -g message-style "bg=#313244,fg=#f9e2af,bold"
set -g message-command-style "bg=#313244,fg=#fab387"
# Copy/search mode highlight
set -g mode-style "bg=#cba6f7,fg=#1e1e2e"
# ── Bell ──────────────────────────────────────────────────────────────────────
set -g visual-bell off
set -g bell-action none
# ── Plugins (TPM) ─────────────────────────────────────────────────────────────
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# tmux-resurrect: save & restore full sessions
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-processes ':all:'
# tmux-continuum: auto-save every 5 minutes, auto-restore on tmux start
set -g @continuum-save-interval '5'
set -g @continuum-restore 'on'
# Initialize TPM (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'