diff --git a/tmux/keybindings.conf b/tmux/keybindings.conf index 3306613..ecb01f5 100644 --- a/tmux/keybindings.conf +++ b/tmux/keybindings.conf @@ -2,7 +2,9 @@ unbind C-b set -g prefix C-s bind C-s send-prefix -bind \; command-prompt -p '#[fill=#1e2030]#[fg=#1b1d2b bg=#ffc777 bold]  COMMAND #[default]#[fg=#ffc777 bg=#3b4261] #{session_name} #[bg=#1e2030] ' +# command-prompt: the COMMAND + session block is now provided globally by +# message-format (statusline.conf), so keep this plain to avoid a doubled block. +bind \; command-prompt # setup Ctrl + l as clear tmux history bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history diff --git a/tmux/statusline.conf b/tmux/statusline.conf index a0882f3..bda1ecc 100644 --- a/tmux/statusline.conf +++ b/tmux/statusline.conf @@ -17,7 +17,7 @@ # ── mode colour ────────────────────────────────────────────────────────────── # Follows tmux's current state, mirroring the nvim lualine mode hues. -# COMMAND client_prefix yellow #ffc777 +# PREFIX client_prefix orange #ff966c (leader-wait; the real COMMAND is the command-prompt, styled in keybindings.conf) # VISUAL selection (charwise) magenta #c099ff # V-BLOCK selection + rectangle magenta #c099ff (tmux has no linewise flag, so no V-LINE) # COPY copy-mode green #c3e88d @@ -25,7 +25,7 @@ # SYNC synchronize-panes red #ff757f (zoom already shows as #F in the window list) # INSERT default blue #82aaff set -g @sl_mode_color '\ -#{?client_prefix,#ffc777,\ +#{?client_prefix,#ff966c,\ #{?pane_in_mode,\ #{?selection_present,#c099ff,#{?#{==:#{pane_mode},view-mode},#4fd6be,#c3e88d}},\ #{?pane_synchronized,#ff757f,#82aaff}}}' @@ -33,7 +33,7 @@ set -g @sl_mode_color '\ # ── mode label ─────────────────────────────────────────────────────────────── # Parallel to @sl_mode_color: same branches, resolving to the label text. set -g @sl_mode_label '\ -#{?client_prefix,COMMAND,\ +#{?client_prefix,PREFIX,\ #{?pane_in_mode,\ #{?selection_present,#{?rectangle_toggle,V-BLOCK,VISUAL},#{?#{==:#{pane_mode},view-mode},VIEW,COPY}},\ #{?pane_synchronized,SYNC,INSERT}}}' @@ -57,3 +57,21 @@ set -g status-left '\ # ── status-right ───────────────────────────────────────────────────────────── # The right-hand half of the nvim vimbridge (lualine) output. set -g status-right '#(cat #{socket_path}-\#{session_id}-vimbridge-R)' + +# ── command-prompt / message area ──────────────────────────────────────────── +# tmux draws EVERY interactive prompt (command-prompt, move-window, rename, +# copy-mode search, choose-tree filter) and every passive message over the status +# line via message-format. Its default is just "#[style]#{message}", which starts +# at column 0 and covers the mode block. We prepend the same COMMAND + session +# blocks used in status-left so a prompt continues AFTER the session block, with +# the native prompt text following it (#{message} = the prompt label plus the +# typed input) -- mirroring the prefix look. +# +# This is the ONLY lever that reaches the built-in filter/search prompts, which +# cannot take a -p label. message-format has no per-prompt-type variable, so the +# label is a fixed COMMAND for every prompt (and message); the native +# "(move-window)" / "(filter)" text is what distinguishes them. #{command_prompt} +# is tmux's vi-command-mode flag (NOT "is a command"), kept so the input keeps +# using message-command-style while in vi normal mode. The `;` binding is plain +# command-prompt (keybindings.conf) so this block is not doubled. +set -g message-format '#[fill=#1e2030]#[fg=#1b1d2b bg=#ffc777 bold]  COMMAND #[default]#[fg=#ffc777 bg=#3b4261] #{session_name} #[default]#[bg=#1e2030] #[#{?#{command_prompt},#{E:message-command-style},#{E:message-style}}]#{message}'