Created
February 4, 2026 17:33
-
-
Save kaushikgopal/2327b09ae1a194704d62da48d135dd35 to your computer and use it in GitHub Desktop.
tmux configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Kaush's tmux configuration | |
| # https://kau.sh | |
| # switch prefix key from Ctrl B → Ctrl A | |
| unbind-key C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| set-window-option -g mode-keys vi | |
| set -g default-shell /opt/homebrew/bin/fish | |
| set -g default-command /opt/homebrew/bin/fish | |
| set-option -sg escape-time 0 | |
| set-option -g history-limit 5000 | |
| # Notify when background work produces output (activity) or explicitly rings a bell. | |
| # - Activity covers builds/tests that print output in another window. | |
| # - Bell covers commands that end with `printf '\a'` (or similar). | |
| set-window-option -g monitor-activity on | |
| set-option -g visual-activity on | |
| set-option -g activity-action other | |
| set-option -g visual-bell on | |
| set-option -g bell-action other | |
| # Keep tmux alerts/messages visible slightly longer (milliseconds). | |
| set-option -g display-time 1000 | |
| # automatically rename tmux-window to current path | |
| set-option -g automatic-rename on | |
| set-option -g automatic-rename-format '#{b:pane_current_path}' | |
| # interpret mouse gestures properly | |
| set-window-option -g mouse on | |
| # bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy" | |
| # ------------------------------------ | |
| # rebinding common commands | |
| bind-key V split-window -h | |
| bind-key S split-window -v | |
| bind-key J resize-pane -D 5 | |
| bind-key K resize-pane -U 5 | |
| bind-key H resize-pane -L 5 | |
| bind-key L resize-pane -R 5 | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| # kill pane/window without confirmation | |
| bind-key x kill-pane | |
| bind-key & kill-window | |
| # choose-tree with dimmer window names (sessions stay bright) | |
| # note: tree prefix (-> + 0:) is rendered by tmux separately, color only affects description | |
| bind-key w choose-tree -Zw -F '#{?window_format,#[fg=brightblack]#{window_name}#{window_flags}: "#{pane_title}" #{pane_current_path},#{session_windows} windows#{?session_attached, (attached),}}' | |
| # ------------------------------------ | |
| # True color (24-bit RGB) support for terminals like Ghostty | |
| set -g default-terminal "tmux-256color" | |
| set -ga terminal-overrides ",ghostty:Tc" | |
| set -ga terminal-overrides ",xterm-ghostty:Tc" | |
| set -ga terminal-overrides ",xterm-256color:Tc" | |
| # customize status bar colors | |
| set-window-option -g window-status-current-style fg=5 | |
| set-option -g status-bg '#282C34' | |
| set-option -g status-fg colour240 | |
| set-option -g status-left '#[fg=colour82,bold][tmux] #[default]' | |
| set-option -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' | |
| set-option -g status-right-length 80 | |
| set-option -g status-left-length 20 | |
| # pane border colors | |
| # inactive border was too light; keep active border green | |
| set-option -g pane-border-style fg=colour238 | |
| set-option -g pane-active-border-style fg=colour82 | |
| # --------------------------------------------- | |
| # fzf file picker popup (Ctrl+A t) | |
| # Ctrl+G: show gitignored files | Ctrl+H: hide gitignored files | |
| bind-key t run-shell "tmux display-popup -E -w 80% -h 80% '~/bin/tmux-fzf-picker \"#{pane_current_path}\" \"#{pane_id}\"'" | |
| # --------------------------------------------- | |
| # Subagent menu (prefix + 9) | |
| # Spawns a background window running a chosen CLI agent. | |
| bind-key g display-menu -T "Subagent" \ | |
| "Spawn (codex)" c "run-shell -b '$HOME/bin/tmux-subagent prompt-spawn \"#{pane_id}\" \"#{pane_current_path}\" codex'" \ | |
| "Spawn (claude)" a "run-shell -b '$HOME/bin/tmux-subagent prompt-spawn \"#{pane_id}\" \"#{pane_current_path}\" claude'" \ | |
| "Spawn (gemini)" g "run-shell -b '$HOME/bin/tmux-subagent prompt-spawn \"#{pane_id}\" \"#{pane_current_path}\" gemini'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment