tmux: make active pane clearly visible with high-contrast border

This commit is contained in:
Thomas Naderer
2026-02-21 22:08:57 +01:00
parent 935f3a3b9a
commit 7213073bfa

View File

@@ -37,8 +37,9 @@ set -g renumber-windows on
# Increase scrollback buffer size # Increase scrollback buffer size
set -g history-limit 10000 set -g history-limit 10000
# Don't rename windows automatically # Enable automatic renaming for nerd font icons
set-option -g allow-rename off set-option -g allow-rename on
set-option -g automatic-rename on
# Reduce escape time for neovim # Reduce escape time for neovim
set -sg escape-time 0 set -sg escape-time 0
@@ -99,7 +100,7 @@ bind c new-window -c "#{pane_current_path}"
# Quick pane cycling # Quick pane cycling
bind -r C-h select-window -t :- bind -r C-h select-window -t :-
bind -r C-l select-window -t :+ # bind -r C-l select-window -t :+
# Kill pane without confirmation # Kill pane without confirmation
bind x kill-pane bind x kill-pane
@@ -110,8 +111,11 @@ bind X kill-window
# Toggle zoom # Toggle zoom
bind z resize-pane -Z bind z resize-pane -Z
# Synchronize panes # Flash currently active pane border (helpful when visually lost)
bind y set-window-option synchronize-panes bind Space display-message "Active pane: #P (#{pane_current_command})"
# Synchronize panes with status message
bind y set-window-option synchronize-panes \; display-message "Synchronize panes #{?synchronize-panes,ON,OFF}"
# Quick session switching # Quick session switching
bind S choose-tree -sZ -O name bind S choose-tree -sZ -O name
@@ -128,6 +132,18 @@ set -g mouse on
# Don't jump to bottom when mouse selecting # Don't jump to bottom when mouse selecting
unbind -T copy-mode-vi MouseDragEnd1Pane unbind -T copy-mode-vi MouseDragEnd1Pane
# URL handling - enable clickable URLs
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-urlview'
# Nerd font window name plugin
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
# Mouse click behavior - simple pane selection without copy-mode
bind-key -T copy-mode-vi MouseDown1Pane select-pane
bind-key -T copy-mode MouseDown1Pane select-pane
bind-key -n MouseDown1Pane select-pane -t =
# ============================================ # ============================================
# GRUVBOX STYLING # GRUVBOX STYLING
# ============================================ # ============================================
@@ -140,9 +156,13 @@ set -g status-style "bg=#3c3836,fg=#ebdbb2"
set -g status-left-length 100 set -g status-left-length 100
set -g status-right-length 100 set -g status-right-length 100
# Pane borders # Pane borders (strong active contrast)
set -g pane-border-style "fg=#3c3836" set -g pane-border-style "fg=#3c3836"
set -g pane-active-border-style "fg=#d79921" set -g pane-active-border-style "fg=#fabd2f,bold"
# Show pane labels on borders for easier focus tracking
set -g pane-border-status top
set -g pane-border-format "#{?pane_active,#[fg=#282828,bg=#fabd2f,bold] ACTIVE #[default],#[fg=#928374] pane #[default]}#[fg=#ebdbb2] #P #[fg=#928374]| #[fg=#83a598]#{pane_current_command} #[fg=#928374]| #[fg=#bdae93]#{pane_current_path}"
# Message styling # Message styling
set -g message-style "bg=#d79921,fg=#282828,bold" set -g message-style "bg=#d79921,fg=#282828,bold"
@@ -154,8 +174,8 @@ set -g mode-style "bg=#d79921,fg=#282828,bold"
# Colorful window status styling # Colorful window status styling
set -g window-status-style "fg=#a89984,bg=#3c3836" set -g window-status-style "fg=#a89984,bg=#3c3836"
# Different colors for different windows # Different colors for different windows (15+ colors)
setw -g window-status-format "#[fg=#282828,bg=#{?#{==:#{window_index},0},#98971a,#{?#{==:#{window_index},1},#458588,#{?#{==:#{window_index},2},#b16286,#{?#{==:#{window_index},3},#689d6a,#{?#{==:#{window_index},4},#d65d0e,#cc241d}}}}}] #I #[fg=#ebdbb2,bg=#3c3836] #W " setw -g window-status-format "#[fg=#282828,bg=#{?#{==:#{window_index},0},#98971a,#{?#{==:#{window_index},1},#458588,#{?#{==:#{window_index},2},#b16286,#{?#{==:#{window_index},3},#689d6a,#{?#{==:#{window_index},4},#d65d0e,#{?#{==:#{window_index},5},#cc241d,#{?#{==:#{window_index},6},#a89984,#{?#{==:#{window_index},7},#83a598,#{?#{==:#{window_index},8},#d3869b,#{?#{==:#{window_index},9},#8ec07c,#{?#{==:#{window_index},10},#fe8019,#{?#{==:#{window_index},11},#fb4934,#{?#{==:#{window_index},12},#bdae93,#{?#{==:#{window_index},13},#7c6f64,#{?#{==:#{window_index},14},#665c54,#504945}}}}}}}}}}}}}}}] #I #[fg=#ebdbb2,bg=#3c3836] #W "
# Current window status - bright yellow # Current window status - bright yellow
set -g window-status-current-style "fg=#282828,bg=#d79921,bold" set -g window-status-current-style "fg=#282828,bg=#d79921,bold"
@@ -184,6 +204,9 @@ set -g bell-action any
set -g clock-mode-colour "#d79921" set -g clock-mode-colour "#d79921"
set -g clock-mode-style 24 set -g clock-mode-style 24
# Optionally also dim inactive windows further
set -g window-status-style "fg=#928374,bg=#3c3836"
# ============================================ # ============================================
# TRANSPARENCY SETTINGS # TRANSPARENCY SETTINGS
# ============================================ # ============================================
@@ -197,4 +220,7 @@ set -g window-active-style "bg=default"
# ============================================ # ============================================
# Reload config file with message # Reload config file with message
bind r source-file ~/.config/tmux/tmux.conf \; display-message "󰑓 Config reloaded!" bind r source-file ~/.config/tmux/tmux.conf \; display-message "󰑓 Config reloaded!"
# Initialize TMUX plugin manager (keep this line at the very bottom)
run '~/.config/tmux/plugins/tpm/tpm'