feat: warn users of whitespace in module lists (#266)
This commit is contained in:
parent
3c6f6f282b
commit
362a306db7
2 changed files with 11 additions and 1 deletions
|
@ -308,7 +308,7 @@ set -g @catppuccin_pane_background_color "#{thm_orange}"
|
||||||
#### Set the module list
|
#### Set the module list
|
||||||
```sh
|
```sh
|
||||||
set -g @catppuccin_status_modules_right "application session"
|
set -g @catppuccin_status_modules_right "application session"
|
||||||
set -g @catppuccin_status_modules_left ""
|
set -g @catppuccin_status_modules_left "null"
|
||||||
```
|
```
|
||||||
Provide a list of modules and the order in which you want them to appear in the status.
|
Provide a list of modules and the order in which you want them to appear in the status.
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,16 @@ load_modules() {
|
||||||
continue 2
|
continue 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ -z "${module_name/ }" ]]; then
|
||||||
|
if [[ -z "${modules_list/ }" ]]; then
|
||||||
|
tmux_echo "catppuccin warning: a module list has only white space, to remove all modules set it to \"null\""
|
||||||
|
else
|
||||||
|
tmux_echo "catppuccin warning: a module list with value \"$modules_list\" has leading/trailing whitespace"
|
||||||
|
fi
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
tmux_echo "catppuccin warning: module $module_name not found"
|
tmux_echo "catppuccin warning: module $module_name not found"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue