Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tmux/keybindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 21 additions & 3 deletions tmux/statusline.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@

# ── 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
# VIEW view-mode teal #4fd6be
# 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}}}'

# ── 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}}}'
Expand All @@ -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}'