catppuccin / tmux

💽 Soothing pastel theme for Tmux!
MIT License
1.85k stars 575 forks source link

Commit d91c5b0 breaks my catppuccin status bar #185

Closed RoninTech closed 6 months ago

RoninTech commented 6 months ago

Just finished a git bisect session and found that this commit breaks my catppuccin themed tmux.

I'm on a Raspberry Pi 4 running tmux 3.1c with tpm and catppuccin in wezterm. Hadn't done a tpm update for a while and when I did my status bar went from beautiful to barely visible. Here is my tmux.conf file:

# Set prefix key to screen's
set -g prefix C-a

# Make mouse useable
set -g mouse on

# Scrollback buffer
set -g history-limit 10000

bind | split-window -h
bind - split-window -v

set -sg escape-time 1
set -sg repeat-time 200

# start window numbers from 1 not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on

set -g default-terminal "wezterm"
set -g default-terminal "screen-256color"
#set-option -ga terminal-overrides ",*-256color*:TC"

set -g status on
set -g mode-keys vi

# notifications
setw -g monitor-activity on
set -g visual-activity on

# auto rename
setw -g automatic-rename on

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'brennanfee/tmux-paste'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'frappe' # latte or frappe, macchiato, mocha (default)

set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"

set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"

set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"

set -g @catppuccin_status_modules_right "host session date_time"

set -g @catppuccin_status_left_separator  ""
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"

set -g @catppuccin_directory_text "#{pane_current_path}"

set -g @catppuccin_date_time_text "%d%h,%Y | %I:%M%p"

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

Without this change: image

With this change: image

If I change catppuccin.tmux as follows with the latest code, my status bar works again:

diff --git a/catppuccin.tmux b/catppuccin.tmux
index 46686a5..75452ee 100755
--- a/catppuccin.tmux
+++ b/catppuccin.tmux
@@ -80,7 +80,7 @@ main() {
   pane_border_style=$(get_tmux_option "@catppuccin_pane_border_style" "fg=${thm_gray}")
   pane_active_border_style=$(
     get_tmux_option "@catppuccin_pane_active_border_style" \
-      "#{?pane_in_mode,fg=${thm_yellow},#{?pane_synchronized,fg=${thm_magenta},fg=${thm_orange}}}"
+      "fg=${thm_orange}"
   )
   pane_left_separator=$(get_tmux_option "@catppuccin_pane_left_separator" "█")
   pane_middle_separator=$(get_tmux_option "@catppuccin_pane_middle_separator" "█")

I commented out my other tmux plugins so it was just catppuccin. Also tried the other flavours with the same results. Backing the above stuff out fixed my status bar being visible issue but not sure what the ramifications are.

vdbe commented 6 months ago

It seems that that change follows the default of tmux this was changed in 3.2. I suggest manually setting it set -g @catppuccin_pane_active_border_style 'fg=#ef9f76' (not ideal) or updating tmux.

RoninTech commented 6 months ago

Ok, so I reverted my change to use the latest and added that line to my ~/.tmux.conf and it worked. Thanks for that and a good workaround for anyone else experiencing this with an older version of tmux. I've been on the road for a while but in a couple of months I'll have a chance to update my RPi to Debian bookworm which should give me a tmux >= version 3.2.

vdbe commented 6 months ago

Tmux 3.3a is in the debian bullseye-backports repository.

We recently added some checks so hopefully something like this will be noticed in the future (the tmux version tested is 3.2a however).

Happy to help.

RoninTech commented 6 months ago

Awesome, thanks for that! I had no idea about the debian backports. Now I'm on 3.3a and I don't see the issue.

Learn something every day. :-)