Merge pull request #112 from peterkracik/main

Configure path for custom modules
This commit is contained in:
Valentin Uveges 2024-01-17 20:39:46 +02:00 committed by GitHub
commit 20c9542ec4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -197,7 +197,8 @@ build_status_module() {
load_modules() {
local modules_list=$1
local modules_custom_path=$PLUGIN_DIR/custom
local custom_path="$(get_tmux_option "@catppuccin_custom_plugin_dir" "${PLUGIN_DIR}/custom")"
local modules_custom_path=$custom_path
local modules_status_path=$PLUGIN_DIR/status
local modules_window_path=$PLUGIN_DIR/window

View file

@ -31,6 +31,13 @@ show_<module_name>() { # save this module in a file with the name <module_name>.
}
```
## Configure custom modules path
You can configure a custom path for your modules by setting the `@catppuccin_custom_plugin_dir` option.
```sh
set -g @catppuccin_custom_plugin_dir "<path>"
```
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)")"`.