How to show current mode in status-line in tmux?
For anyone still looking for a solution, you can know when you have typed the tmux prefix
, by adding this to your statusline:
#{?client_prefix,#[fg=colour2]^A,}
When added to status line, you will get a nice little ^A
inside your tmux statusline when you press your prefix. Please, change colour and prefix message accordingly.
You can go fancy, and even toggle all bg colors in your statusline when prefix
is typed.
set -g status-left "#{?client_prefix,#[bg=colour2],#[bg=colour1]}#[fg=colour0] #S "