When I press the prefix-key Ctrl-b tmux doesn't give me a hint that it has been pressed.
Sometimes I can not remember whether I have already pressed it or not.
Can I set up a hint like highlight/change color or show some special symbol in the status bar to show me when I have pressed the prefix-key?
By default, tmux sets the prefix key as Ctrl + b.
tmux may be controlled from an attached client by using a key combination of a prefix key, 'C-b' (Ctrl-b) by default, followed by a command key. The default command key bindings are: C-b Send the prefix key (C-b) through to the application. C-o Rotate the panes in the current window forwards.
The development version of tmux has support for this, so the next release (1.8?) should also support it.
There have been two changes that can be combined to indicate in your status line whether a prefix key has been pressed:
client_prefix
format replacement was added.You could add a (conditional) highlighted <Prefix>
string before the default status-right
like this:
set -g status-right ' #{?client_prefix,#[reverse]<Prefix>#[noreverse] ,}"#{=21:pane_title}" %H:%M %d-%b-%y'
There's also a Tmux plugin called tmux-prefix-highlight that does this.
It adds a new keyword, #{prefix_highlight}
to use in the string that defines your tmux status bar, like so:
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With