Skip to content

Wrong bg/fg on custom separators #403

Open
@vdbe

Description

@vdbe

I am not requesting help with my configuration and believe something is genuinely broken.

  • Something is really actually broken.

Is there an existing issue outlining your problem?

  • I have searched the existing issues and they do not solve my problem.

Describe your problem.

The separators bg (foreground of the separator) is not set correctly.

This was reported in #396 but closed because it's a support question?

In 2.0 the way the separators work was change if you want █ as a separator you need to use (the inverse).

I don't know if this is intended or a bug either way the color's are not set correctly on the separator.

Expected behavior:

  • The left part of left separator should be the color of the status bar.
  • Middle separator:
    • the part against text should have the bg of the text color
    • the part against the number should have the number bg
  • Right separator right part should have the color of the status bar

Deeper look:

$ tmux display-message -p "#{E:window-status-current-format}"
#[fg=#11111b,bg=#9399b2] 2#[fg=#cdd6f4,bg=#313244] default

The left separator #[fg=#11111b,bg=#9399b2] foreground should be the color of the status bar background bg=#181825.

$ tmux display-message -p "#{E:status-style}"
bg=#181825,fg=#cdd6f4

The middle and right separator should be styled correctly or documented that it does not set fg/bg like every other separator.

The that the status bar color is is not directly known in the users config since it's set by this if else block

%if "#{==:#{@catppuccin_status_background},default}"
set -gF @_ctp_status_bg "#{@thm_mantle}"
set -gF status-style "bg=#{@_ctp_status_bg},fg=#{@thm_fg}"
%hidden CTP_MESSAGE_BACKGROUND="#{@thm_overlay_0}"
%elif "#{==:#{@catppuccin_status_background},none}"
set -g status-style "default"
set -g @_ctp_status_bg "none"
%hidden CTP_MESSAGE_BACKGROUND="default"
%else
# Treat @catppuccin_status_background as a format string.
set -gF status-style "bg=#{E:@catppuccin_status_background},fg=#{@thm_fg}"
set -gF @_ctp_status_bg "#{E:@catppuccin_status_background}"
%hidden CTP_MESSAGE_BACKGROUND="#{E:@catppuccin_status_background}"
%endif

making it difficult to set this correctly in the users config.

If the middle and right separators are not styled correctly these can just be removed since it's provides no value over adding them to _text.
into something @catppuccin_window_number and @catppuccin_window_text bringing 4 options to two without losing functionality.

Paste your configuration.

set -g default-terminal screen-256color
set -g @test_config "tmux"
set -g mouse on

set -g status-right-length 100
set -g status-left ""

set -g @catppuccin_window_status_style "custom"

set -g @catppuccin_window_flag "icon"

set -g @catppuccin_window_text " default"
set -g @catppuccin_window_current_text " current"

# set -g @catppuccin_window_number_position "right"

# Pre 2.0 separators
# set -g @catppuccin_window_left_separator "█"
# set -g @catppuccin_window_middle_separator "█"
# set -g @catppuccin_window_right_separator ""

set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_middle_separator ""
set -g @catppuccin_window_right_separator ""

run "$CATPPUCCIN_TMUX_PLUGIN"

Attach screenshots.

Current:
image
image
Expected (old colors):
image

What tmux version are you seeing the issue on?

tmux 3.5a

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions