-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_tmux.conf.tmpl
More file actions
74 lines (67 loc) · 3.11 KB
/
dot_tmux.conf.tmpl
File metadata and controls
74 lines (67 loc) · 3.11 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
# =============================================================================
# TMUX CHEAT SHEET & CONFIGURATION
# =============================================================================
# RELATED DOCS:
# - Ghostty: ~/.config/ghostty/config
# - TmuxAI: ~/.config/tmuxai/config.yaml
#
# PREFIX KEY: Ctrl+b (Default)
#
# SESSIONS:
# - prefix + d : Detach from session
# - prefix + $ : Rename session
# - prefix + s : List sessions
#
# WINDOWS (Tabs):
# - prefix + c : Create window
# - prefix + w : List windows
# - prefix + n/p : Next/Previous window
# - prefix + , : Rename window
#
# PANES (Splits):
# - prefix + % : Split vertically (left/right)
# - prefix + " : Split horizontally (top/bottom)
# - prefix + h/j/k/l : Navigate panes (Vim style)
# - prefix + z : Toggle pane zoom (fullscreen)
# - prefix + x : Close pane
#
# TMUXAI (Terminal AI Assistant):
# - prefix + a : Open TmuxAI in a 35% side pane
# =============================================================================
# Force default shell to zsh (prevents issues on systems where fish is default)
set-option -g default-shell /bin/zsh
# True color support (critical for eza, bat, neovim, and ghostty)
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set -ag terminal-overrides ",alacritty:RGB"
set -ag terminal-overrides ",ghostty:RGB"
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# TmuxAI Integration: bind 'prefix + a' to split window and run tmuxai
# We use run-shell so that #{pane_id} is evaluated to the active pane before the split.
# This allows tmuxai to use the correct pane for command execution.
# Note: On macOS, we explicitly add Homebrew bin paths because run-shell's sh environment
# might not include them, leading to 'tmux: command not found' (exit 127).
{{- if eq .chezmoi.os "darwin" }}
bind a run-shell 'PATH=$PATH:/opt/homebrew/bin:/usr/local/bin tmux split-window -h -p 35 "TMUXAI_EXEC_PANE=#{pane_id} {{ .chezmoi.homeDir }}/.local/bin/tmuxai"'
{{- else }}
bind a run-shell 'tmux split-window -h -p 35 "TMUXAI_EXEC_PANE=#{pane_id} {{ .chezmoi.homeDir }}/.local/bin/tmuxai"'
{{- end }}
# Status bar customization (p10k classic dark powerline match)
set-option -g status-position bottom
set -g status-style bg=colour236,fg=colour255
set -g status-left-length 40
set -g status-left "#[bg=colour31,fg=colour255,bold] #S #[bg=colour236,fg=colour31,nobold]"
set -g window-status-separator ""
set -g window-status-current-format "#[fg=colour236,bg=colour240]#[fg=colour255,bg=colour240,bold] #I #W #[fg=colour240,bg=colour236,nobold]"
set -g window-status-format "#[fg=colour250,bg=colour236] #I #W "
set -g status-right-length 100
set -g status-right "#[fg=colour240,bg=colour236]#[fg=colour255,bg=colour240] %H:%M %Y-%m-%d #[fg=colour31,bg=colour240]#[fg=colour255,bg=colour31,bold] #(whoami)@#h "