# minimal tmux config # history set -g history-limit 100000 # mouse set -g mouse on # utf8 / colors set -g default-terminal "screen-256color" set -q -g status-utf8 on setw -q -g utf8 on # panes retain path bind '"' split-window -v -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" # shift+arrow window switching (no wrap) bind -n S-Left if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "previous-window" bind -n S-Right if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "next-window" # swap windows left/right with PgUp/PgDn (no wrap) bind-key -n PgUp if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "swap-window -t -1\; select-window -t -1" bind-key -n PgDn if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "swap-window -t +1\; select-window -t +1" # sensible defaults set -s escape-time 10 set -g base-index 1 setw -g pane-base-index 1 set -g renumber-windows on # Auto-rename windows: directory/process set -g automatic-rename on set -g automatic-rename-format '#{pane_current_command}@#{b:pane_current_path}#{?pane_title,: #{pane_title},}' # Rename window (prefix + R) bind R command-prompt -I "#{window_name}" "rename-window '%%'" # Fuzzy window switcher (prefix + f) bind f display-popup -E "tmux list-windows -F '#{window_index}: #{window_name}' | fzf --reverse | cut -d: -f1 | xargs tmux select-window -t" # status bar set -g status-style "bg=colour235,fg=colour248" set -g status-left "#[fg=colour232,bg=colour34,bold]#S#[fg=colour34,bg=colour235,nobold]" set -g status-left-length 30 set -g status-right "" set -g status-right-length 40 # window tabs setw -g window-status-format "#{?#{m:*[13579],#{window_index}},#[fg=colour235]#[bg=colour236]#[fg=colour250] #I #W #[fg=colour236]#[bg=colour235],#[fg=colour235]#[bg=colour233]#[fg=colour244] #I #W #[fg=colour233]#[bg=colour235]}" setw -g window-status-current-format "#[fg=colour235,bg=colour34]#[fg=colour232,bg=colour34,bold] #I #W #[fg=colour34,bg=colour235]" setw -g window-status-separator "" # pane borders set -g pane-border-style "fg=colour238" set -g pane-active-border-style "fg=colour34"