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:
parent
893917360d
commit
ff6dacb12f
2 changed files with 9 additions and 1 deletions
|
@ -29,9 +29,12 @@ load_modules() {
|
||||||
source "$module_path"
|
source "$module_path"
|
||||||
loaded_modules="$loaded_modules$( "show_$module_name" "$module_index" )"
|
loaded_modules="$loaded_modules$( "show_$module_name" "$module_index" )"
|
||||||
module_index+=1
|
module_index+=1
|
||||||
break
|
continue 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
tmux_echo "catppuccin warning: module $module_name not found"
|
||||||
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "$loaded_modules"
|
echo "$loaded_modules"
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
tmux_echo() {
|
||||||
|
local message="$1"
|
||||||
|
tmux run-shell "echo '$message'"
|
||||||
|
}
|
||||||
|
|
||||||
get_tmux_option() {
|
get_tmux_option() {
|
||||||
local option value default
|
local option value default
|
||||||
option="$1"
|
option="$1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue