From fc23dfe931bfcc5b8f0d5f34c6a00d0dc63353cd Mon Sep 17 00:00:00 2001 From: qadzek <84473512+qadzek@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:04:40 +0100 Subject: [PATCH] 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. --- custom/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom/README.md b/custom/README.md index 232df4a..6f7dbd6 100644 --- a/custom/README.md +++ b/custom/README.md @@ -30,3 +30,7 @@ show_() { # save this module in a file with the 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)")"`.