# ─── Prefix ─────────────────────────────────────────────────────────────────── set-option -g prefix C-a unbind-key C-b bind-key C-a send-prefix # ─── General ────────────────────────────────────────────────────────────────── set -g base-index 1 set -g pane-base-index 1 set -g renumber-windows on set -g history-limit 50000 set -g display-time 1500 set -g status-interval 5 set -g focus-events on set -s escape-time 0 set-window-option -g aggressive-resize on set-window-option -g mode-keys vi set-window-option -g mouse off set -g status-keys vi # ─── Terminal / Colors ──────────────────────────────────────────────────────── set -g default-terminal "${TERM}" set -ga terminal-overrides ',*256col*:Tc' set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # Undercurl 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' # ─── Status Line ────────────────────────────────────────────────────────────── set -g status on set -g status-position top set-option -g status-style bg=#151515,fg=white set-option -g automatic-rename on set-option -g status-left "" set -ga status-left '#[bg=#151515]#[fg=white] #{?window_zoomed_flag,[Z], }' set-option -g status-right "" set-option -g window-status-format " #[fg=#E1E1E1] #{window_index}:#{window_name}#{window_flags} " set-option -g window-status-current-format " #[bold bg=#151515] > #{window_index}:#{window_name}#{window_flags} " # ─── Reload Config ──────────────────────────────────────────────────────────── bind r source-file $HOME/.config/tmux/tmux.conf \; display "Config reloaded" # ─── Splits & Windows ───────────────────────────────────────────────────────── bind h split-window -h -c "#{pane_current_path}" bind v split-window -v -c "#{pane_current_path}" unbind '"' unbind % bind c new-window -c "#{pane_current_path}" bind s list-sessions # ─── Pane Navigation (Colemak: m/n/e/i = left/down/up/right) ───────────────── bind -n M-m select-pane -L bind -n M-n select-pane -D bind -n M-e select-pane -U bind -n M-i select-pane -R # ─── Pane Resize (prefix + capital, or Alt+Shift for single-step) ───────────── bind -r M resize-pane -L 5 bind -r N resize-pane -D 5 bind -r E resize-pane -U 5 bind -r I resize-pane -R 5 bind -r M-m resize-pane -L bind -r M-n resize-pane -D bind -r M-e resize-pane -U bind -r M-i resize-pane -R # ─── Copy Mode ──────────────────────────────────────────────────────────────── bind Escape copy-mode bind p paste-buffer 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 C-v send -X rectangle-toggle bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" # ─── Floating Terminal ──────────────────────────────────────────────────────── bind-key -n -N 'Toggle popup window' M-g if-shell -F '#{m:popup-*,#{session_name}}' { detach-client } { display-popup -d "#{pane_current_path}" \ -xC -yC -w 80% -h 75% \ -E "~/.config/tmux/popup.sh" } # ─── Sesh ───────────────────────────────────────────────────────────────────── set -g detach-on-destroy off bind -N "last-session (via sesh)" L run-shell "sesh last" bind-key T run-shell "sesh connect \"$( sesh list --icons | grep -v '^popup-' | fzf-tmux -p 80%,70% \ --no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \ --header ' ^a all ^t tmux ^g configs ^x zoxide ^d kill ^f find' \ --bind 'tab:down,btab:up' \ --bind 'ctrl-a:change-prompt(\uf0e7 )+reload(sesh list --icons)' \ --bind 'ctrl-t:change-prompt(\uf2d2 )+reload(sesh list -t --icons)' \ --bind 'ctrl-x:change-prompt(\uf013 )+reload(sesh list -z --icons)' \ --bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(\uf1f8 )+reload(sesh list --icons)' \ --bind 'ctrl-f:change-prompt(\uf002 )+reload(fd -H -d 2 -t d . ~)' \ --preview 'sesh preview {}' \ --preview-window 'right:55%' )\""