# # Hierarchy: # Server # ㄴSession # ㄴWindow # ㄴPane # ============================================================================= # Environment # ============================================================================= # Set default PATH for run-shell commands set-environment -g PATH "/opt/homebrew/bin:$HOME/.tmux/bin:$PATH" # ============================================================================= # Plugins # ============================================================================= set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'babarot/tmux-powerkit#feature/separate-left-right-plugins' set -g @plugin 'babarot/tmux-git-prompt' # PowerKit theme configuration set -g @powerkit_theme 'tokyo-night' set -g @powerkit_theme_variant 'night' set -g @powerkit_plugins_left 'external(|$(~/.tmux/bin/kube)|secondary|accent|0)' set -g @powerkit_plugins_right 'external(|$(~/.tmux/bin/path --dir #{pane_current_path} --style minimal)|secondary|accent|0)' # PowerKit keybinding overrides (avoid conflicts with existing bindings) set -g @powerkit_plugin_cache_clear_key "A" set -g @powerkit_plugin_kubernetes_context_selector_key "O" set -g @powerkit_plugin_kubernetes_namespace_selector_key "W" set -g @powerkit_theme_selector_key "F" # ============================================================================= # Basic Settings # ============================================================================= # Mouse support set -g mouse on bind-key -T edit-mode-vi WheelUpPane send-keys -X scroll-up bind-key -T edit-mode-vi WheelDownPane send-keys -X scroll-down # Shell configuration set-option -g default-command "${SHELL}" set-option -s escape-time 0 # Prefix key configuration set-option -g prefix C-s bind-key C-s send-prefix unbind-key C-b # Keep the window's name fixed set-option -g allow-rename off # System window title set-option -g set-titles on set-option -g set-titles-string "[tmux] #T @ #H" # Display time set-option -g display-time 3500 # Start index from 1 set-option -g base-index 1 set-window-option -g pane-base-index 1 # ============================================================================= # Key Bindings # ============================================================================= # Reload configuration bind-key r source-file ~/.tmux.conf ; display-message "[tmux] ~/.tmux.conf reloaded!" bind-key C-r source-file ~/.tmux.conf ; display-message "[tmux] ~/.tmux.conf reloaded!" # Disable default bindings unbind-key t # Disable clock-mode unbind-key -T root C-o # Disable Ctrl-o for last-pane (set by plugin) # --- Clients --- bind-key N switch-client -n bind-key P switch-client -p # --- Windows --- # Split window bind-key | split-window -h -c "#{pane_current_path}" bind-key - split-window -c "#{pane_current_path}" # Change active window bind-key -r C-h select-window -t :- bind-key -r C-l select-window -t :+ # --- Panes --- # Resize pane bind-key -r H resize-pane -L 5 bind-key -r J resize-pane -D 5 bind-key -r K resize-pane -U 5 bind-key -r L resize-pane -R 5 # Change active pane bind-key h select-pane -L bind-key j select-pane -D bind-key k select-pane -U bind-key l select-pane -R # Break or kill pane bind-key b break-pane bind-key q kill-pane bind-key C-q kill-session bind-key C-x run "tmux kill-pane || tmux kill-window" # ============================================================================= # Appearance # ============================================================================= # Terminal settings set-option -g default-terminal "screen-256color" set-option -g status-position top # Status bar configuration set-option -g status on set-option -g status-left-length 2000 set-option -g status-right-length 2000 set-option -g status-interval 1 set-option -g status-justify centre # Pane border settings set-window-option -g pane-border-status top setw -g window-status-activity-style bg="colour235" # Visual notifications set-window-option -g monitor-activity on set-option -g visual-activity on # Copy-mode style (Tokyo Night) set-option -g mode-style "bg=#283457,fg=#c0caf5" # ============================================================================= # Copy Mode # ============================================================================= set-window-option -g mode-keys vi # Enter copy mode bind-key v copy-mode ; display "Copy mode!" bind-key C-v copy-mode ; display "Copy mode!" bind-key C-s copy-mode ; display "Copy mode!" # Copy mode key bindings bind-key -T edit-mode-vi Up send-keys -X history-up bind-key -T edit-mode-vi Down send-keys -X history-down bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" unbind-key -T copy-mode-vi Space unbind-key -T copy-mode-vi Enter # ============================================================================= # Plugin Manager # ============================================================================= run '~/.tmux/plugins/tpm/tpm'