Closed olimorris closed 2 years ago
Have you tried doing:
set -g @mode_indicator_prefix_prompt ' WAIT #[fg=$color_green] '
I have just now and unfortunately it doesn't seem to apply any formatting to the separator at all
My bad, can you try it with double quote?
set -g @mode_indicator_prefix_prompt " WAIT #[fg=$color_green] "
Assuming you have $color_green
environment variable set.
Still no luck unfortunately. I do have those env vars set and to be explicit, this is my relevant config:
color_bg="#f0f0f0"
color_fg="#6a6a6a"
color_green="#1da912"
color_yellow="#eea825"
color_red="#e05661"
color_blue="#118dc3"
color_purple="#9a77cf"
color_gray="#b5b5b5"
color_selection="#bfceff"
set -g @mode_indicator_prefix_prompt " WAIT #[fg=$color_green]"
set -g @mode_indicator_prefix_mode_style bg=$color_green,fg=$color_bg
set -g @mode_indicator_copy_prompt " COPY #[fg=$color_blue]"
set -g @mode_indicator_copy_mode_style bg=$color_blue,fg=$color_bg
set -g @mode_indicator_sync_prompt " SYNC #[fg=$color_red]"
set -g @mode_indicator_sync_mode_style bg=$color_red,fg=$color_bg
set -g @mode_indicator_empty_prompt " TMUX #[fg=$color_purple]"
set -g @mode_indicator_empty_mode_style bg=$color_purple,fg=$color_bg
mode_separator=""
set -g status-left "#{tmux_mode_indicator}#{mode_separator} "
This is what you need:
mode_separator=" "
set -g @mode_indicator_prefix_prompt " WAIT #[default]#[fg=$color_green]$mode_separator"
set -g @mode_indicator_prefix_mode_style bg=$color_green,fg=$color_bg
set -g @mode_indicator_copy_prompt " COPY #[default]#[fg=$color_blue]$mode_separator"
set -g @mode_indicator_copy_mode_style bg=$color_blue,fg=$color_bg
set -g @mode_indicator_sync_prompt " SYNC #[default]#[fg=$color_red]$mode_separator"
set -g @mode_indicator_sync_mode_style bg=$color_red,fg=$color_bg
set -g @mode_indicator_empty_prompt " TMUX #[default]#[fg=$color_purple]$mode_separator"
set -g @mode_indicator_empty_mode_style bg=$color_purple,fg=$color_bg
Or you can do this:
mode_separator="#[default]#{?client_prefix,#[fg=$color_green],#{?pane_in_mode,#[fg=$color_blue],#{?pane_synchronized,#[fg=$color_red],#[fg=$color_purple]}}} "
set -g @mode_indicator_prefix_prompt " WAIT $mode_separator"
set -g @mode_indicator_prefix_mode_style bg=$color_green,fg=$color_bg
set -g @mode_indicator_copy_prompt " COPY $mode_separator"
set -g @mode_indicator_copy_mode_style bg=$color_blue,fg=$color_bg
set -g @mode_indicator_sync_prompt " SYNC $mode_separator"
set -g @mode_indicator_sync_mode_style bg=$color_red,fg=$color_bg
set -g @mode_indicator_empty_prompt " TMUX $mode_separator"
set -g @mode_indicator_empty_mode_style bg=$color_purple,fg=$color_bg
Or basically you can put whatever you want in those @mode_indicator_*_prompt
variables.
The first one is such a beautifully elegant solution. Many thanks, greatly appreciated.
Firstly, I love the plugin. Simple, concise and just works.
I have a separator, which follows the mode indicator, as seen below:
It's just a typical powerline separator. However when I change the mode, of course the separator stays the same color:
That is because my config is:
It would be great if there was a way to color the separator based on the current mode and its defined style.