mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
kitty full config (theme symlink preserved, VictorMono NF). yazi opener OS-branched via template (open vs xdg-open). yazi/lazygit refreshed to live. lazydocker default empty config. gh config.yml as private_ — hosts.yml excluded (oauth token). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
136 lines
6.7 KiB
Bash
136 lines
6.7 KiB
Bash
# ── Plugins ──────────────────────────────────────────────────────────────
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'vaaleyard/tmux-dotbar'
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
|
|
set -g @plugin 'omerxx/tmux-sessionx'
|
|
set -g @plugin 'tmux-plugins/tmux-continuum' # keep last
|
|
set -g @plugin 'eduwass/tmux-palette'
|
|
|
|
# ── Kitty compatibility ──────────────────────────────────────────────────
|
|
set-option -g renumber-windows on
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
set -g default-terminal "tmux-256color"
|
|
set -ga terminal-overrides ",xterm-kitty:Tc"
|
|
set -as terminal-features ",xterm-kitty:RGB:usstyle:hyperlinks:clipboard:extkeys"
|
|
set -g extended-keys always
|
|
set -gq extended-keys-format csi-u
|
|
set-option -g status-position top
|
|
|
|
# ── Status bar ─────────────────────────────────────────────────────────────────
|
|
# Dotbar
|
|
set -g @tmux-dotbar-position top
|
|
set -g @tmux-dotbar-session-position "right"
|
|
set -g @tmux-dotbar-rounded true
|
|
set -g @tmux-dotbar-bg "#0B0E14"
|
|
set -g @tmux-dotbar-fg "#475266"
|
|
set -g @tmux-dotbar-fg-current "#BFBDB6"
|
|
set -g @tmux-dotbar-fg-session "#565B66"
|
|
set -g @tmux-dotbar-fg-prefix "#95E6CB"
|
|
set -g @tmux-dotbar-justify "absolute-centre"
|
|
set -g @tmux-dotbar-left "true"
|
|
set -g @tmux-dotbar-right "false"
|
|
set -g @tmux-dotbar-session-position "left"
|
|
set -g @tmux-dotbar-session-text " "
|
|
set -g @tmux-dotbar-status-right-text " %H:%M "
|
|
set -g @tmux-dotbar-window-status-format " #W "
|
|
set -g @tmux-dotbar-window-status-separator " • "
|
|
set -g @tmux-dotbar-maximized-icon ""
|
|
set -g @tmux-dotbar-show-maximized-icon-for-all-tabs false
|
|
set -g @tmux-dotbar-bold-status false
|
|
set -g @tmux-dotbar-bold-current-window false
|
|
set -g @tmux-dotbar-ssh-enabled true
|
|
set -g @tmux-dotbar-ssh-icon ''
|
|
set -g @tmux-dotbar-ssh-icon-only false
|
|
|
|
# Styling
|
|
set -g status-style fg=default,bg=default
|
|
set -g popup-style 'bg=default'
|
|
set -g popup-border-style 'bg=default,fg=#5c5c66'
|
|
set -g popup-border-lines rounded
|
|
set -g @sessionx-additional-options "--color 'bg:-1,bg+:-1,gutter:-1,border:-1,preview-bg:-1'"
|
|
|
|
# Kitty graphics protocol passthrough (yazi / image preview)
|
|
set -g allow-passthrough on
|
|
set -ga update-environment TERM
|
|
set -ga update-environment TERM_PROGRAM
|
|
|
|
# ── Clipboard (Wayland / Niri) ───────────────────────────────────────────
|
|
set -g set-clipboard on # OSC 52 — covers ssh'd sessions
|
|
set -g mouse on
|
|
setw -g mode-keys vi
|
|
bind -T copy-mode-vi v send -X begin-selection
|
|
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "wl-copy"
|
|
bind -T copy-mode-vi Y send -X copy-pipe-and-cancel "wl-copy" \; send -X cancel
|
|
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "wl-copy"
|
|
|
|
# ── Sessions ─────────────────────────────────────────────────────────────
|
|
|
|
set -g @resurrect-strategy-nvim 'session'
|
|
set -g @resurrect-capture-pane-contents 'on'
|
|
set -g @resurrect-processes 'ssh psql mysql sqlite3 purple lazygit lazydocker "claude->claude --continue" opencode'
|
|
set -g @continuum-save-interval '10'
|
|
set -g @continuum-restore 'off' # restore is owned by kitty-tmux launcher
|
|
set -g @sessionx-bind 'o'
|
|
set -g @sessionx-zoxide-mode 'on'
|
|
|
|
# ── Titles → Niri active window ──────────────────────────────────────────
|
|
|
|
set-option -g set-titles on
|
|
set-option -g set-titles-string "#T (#S)"
|
|
set-option -g status-interval 1
|
|
set-window-option -g automatic-rename on
|
|
|
|
# ── QoL ──────────────────────────────────────────────────────────────────
|
|
set -g history-limit 50000
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
set -g renumber-windows on
|
|
|
|
# ── Keybinds ─────────────────────────────────────────────────────────────
|
|
bind -n S-Enter send-keys Escape '[13;2u'
|
|
# New window: on @ssh_host sessions (set by the Vicinae tmux-sessions
|
|
# extension) connect to the same remote; otherwise inherit the local cwd.
|
|
# The remote host is read at runtime — tmux does NOT format-expand a
|
|
# new-window shell-command, so "#{@ssh_host}" there would be taken literally.
|
|
bind-key t if-shell -F '#{@ssh_host}' \
|
|
'new-window "ssh $(tmux show-options -v @ssh_host)"' \
|
|
'new-window -c "#{pane_current_path}"'
|
|
bind-key [ previous-window
|
|
bind-key ] next-window
|
|
bind-key H previous-window
|
|
bind-key L next-window
|
|
set -g @palette-key 'C-Space' # optional, default: C-Space (no-prefix)
|
|
set -g @palette-find-pane-key 'M-f' # optional, no binding by default
|
|
set -g @palette-move-pane-key 'M-m' # optional, no binding by default
|
|
|
|
|
|
# Splits inherit cwd (kitty super+t / super+n land here)
|
|
# vsplit: new pane right at 35% width · hsplit: new pane below at 25% height
|
|
bind % split-window -h -l 30% -c "#{pane_current_path}"
|
|
bind '"' split-window -v -l 25% -c "#{pane_current_path}"
|
|
|
|
# Copy-mode entry (default prefix+[ is rebound above)
|
|
bind Escape copy-mode
|
|
|
|
# ── Pane navigation: ctrl+hjkl, no prefix ────────────────────────────────
|
|
# Vim-aware: if the pane runs (n)vim, forward the key so vim handles its
|
|
# own window movement (pair with vim-tmux-navigator in AstroNvim).
|
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
|
|
bind -n C-h if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
|
bind -n C-j if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
|
bind -n C-k if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
|
bind -n C-l if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
|
# Same nav from inside copy-mode
|
|
bind -T copy-mode-vi C-h select-pane -L
|
|
bind -T copy-mode-vi C-j select-pane -D
|
|
bind -T copy-mode-vi C-k select-pane -U
|
|
bind -T copy-mode-vi C-l select-pane -R
|
|
# Clear-screen escape hatch (C-l is consumed above)
|
|
bind C-l send-keys C-l
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
run '~/.tmux/plugins/tpm/tpm'
|