feat: warning when trying to load a missing module (#244)

print/echo a warning when a `catppuccin_status_modules_right/left` is
trying to load a none existing module.
This does only work when reloading (`tmux source ~/.tmux.conf` /
`tmux source ~/.config/tmux/tmux.conf`)
This commit is contained in:
vdbe 2024-07-12 07:04:07 +00:00 committed by GitHub
parent 893917360d
commit ff6dacb12f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -29,9 +29,12 @@ load_modules() {
source "$module_path"
loaded_modules="$loaded_modules$( "show_$module_name" "$module_index" )"
module_index+=1
break
continue 2
fi
done
tmux_echo "catppuccin warning: module $module_name not found"
done
echo "$loaded_modules"

View file

@ -1,5 +1,10 @@
#!/bin/sh
tmux_echo() {
local message="$1"
tmux run-shell "echo '$message'"
}
get_tmux_option() {
local option value default
option="$1"