docs: demonstrate how to use a command or script

The module template currently only shows how to display a static text. This PR clarifies how to use a command or script to display a dynamic text.
This commit is contained in:
qadzek 2024-01-03 14:04:40 +01:00 committed by GitHub
parent 47e33044b4
commit fc23dfe931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,3 +30,7 @@ show_<module_name>() { # save this module in a file with the name <module_name>.
echo "$module"
}
```
To use the output of a command, use e.g. `local text="$(get_tmux_option "@catppuccin_test_text" "#(date +%T)")"`.
To use the output of a script, use e.g. `local text="$(get_tmux_option "@catppuccin_test_text" "#($HOME/my_script.sh)")"`.