I'm trying to theme tmux to my liking, and I'm stuck at the windowlist selection.
Prefixw shows me the windowlist, with selection bar in yellow; anyone know the incantation for modifying that specific bit?
I don't understand why neric's answer is downvoted since it's actually correct.
When you open a windowlist, styles from mode-style
option are applied to a selected item. Here is a link to sources. As you can see, the default value is bg=yellow,fg=black
. You can change those styles in one command:
set -wg mode-style bg=red,fg=red
set
gives a command to set an option;-w
flag tells that this is a window option;-g
flag tells to set the option globally;mode-style
is option's name;bg=red
sets background color of selection;fg=white
sets text color.Note that set -wg
is just an alias for set-window-option -g
.
As for colors, from man page:
The colour is one of:
black
,red
,green
,yellow
,blue
,magenta
,cyan
,white
, aixterm bright variants (if supported:brightred
,brightgreen
, and so on),colour0
tocolour255
from the 256-colour set, default, or a hexadecimal RGB string such as#ffffff
, which chooses the closest match from the default 256-colour set.
You can also specify attributes, for example bg=red,fg=red,bold
:
The attributes is either none or a comma-delimited list of one or more of:
bright
(orbold
),dim
,underscore
,blink
,reverse
,hidden
, oritalics
, to turn an attribute on, or an attribute prefixed withno
to turn one off.
Please note that this option also affects color of text selection in copy mode.
This is what you are looking for:
set-window-option -g mode-fg white
set-window-option -g mode-bg red
set status-utf8 on
set utf8 on
set -g default-terminal "screen-256color"
set -g status-bg black
set -g status-fg white