catppuccin / tmux

💽 Soothing pastel theme for Tmux
MIT License
1.92k stars 610 forks source link

`catppuccin_status_modules_left/right` empty space treated as a module #263

Closed wojciech-kulik closed 3 months ago

wojciech-kulik commented 3 months ago

Is there an existing issue outlining your problem?

Describe your problem.

When I reload my config I get:

catppuccin warning: module  not found
catppuccin warning: module  not found

Everything seems to be working, but the error is annoying.

Paste your configuration.

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-sessionist'

# Settings
set -g status-position "top"

set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'mocha'

set -g @catppuccin_window_current_background "#363A4F"
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#{?window_zoomed_flag,*,}"

set -g @catppuccin_status_modules_right " "
set -g @catppuccin_status_modules_left "session "
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator " | "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"

Attach screenshots.

No response

What tmux version are you seeing the issue on?

tmux 3.4

Any additional comments?

No response

vdbe commented 3 months ago

Do you also get the warning when removing the trailing space from modules left and setting right to ""?

wojciech-kulik commented 3 months ago

You are right, it's caused by:

set -g @catppuccin_status_modules_right " "
set -g @catppuccin_status_modules_left "session "

I replaced it with:

set -g @catppuccin_status_modules_right ""
set -g @catppuccin_status_modules_left "session"

and warnings are gone, but now the default modules appear on the right side. How can I remove them?

vdbe commented 3 months ago

and warnings are gone, but now the default modules appear on the right side. How can I remove them?

Setting a ln option to "null" will clear/remove it without falling back to the default. https://github.com/catppuccin/tmux?tab=readme-ov-file#removing-a-specific-module-option

wojciech-kulik commented 3 months ago

Works great now! Thank you 🍻 !

vdbe commented 3 months ago

Is still an error in the README, will fix later. And need to check if a module is not just empty space before trying to load it.