tmux-catppuccin-coal/custom
2023-08-10 08:50:15 +03:00
..
example.sh feat(custom): add logic to load modules form custom, status and window so that the user cand define it's own modules or override any existing one 2023-08-10 08:50:15 +03:00
README.md feat(custom): add logic to load modules form custom, status and window so that the user cand define it's own modules or override any existing one 2023-08-10 08:50:15 +03:00

User defined modules

Description

This folder is used to store user defined modules. You can use this folder to add a new module or override any existing module. To override an existing module, make sure you use the same name for your module as the module you want to override. You can also override the window module for current and default window.

Create a new module

Use the Module template (or example.sh) as a starting point when creating a new module. Save the new module under this folder using the module name as the file name and .sh as the extension. Update the status module list with your module.

set -g @catppuccin_status_modules "... <module_name> ..."

Module template

show_<module_name>() { # save this module in a file with the name <module_name>.sh local index=$1 # this variable is used by the module loader in order to know the position of this module local icon="$(get_tmux_option "@catppuccin_<module_name>icon" "<Use an icon from nerdfonts>")" local color="$(get_tmux_option "@catppuccin<module_name>color" "<Use one of the default theme colors (ex: $thm_orange), or provide a color code (ex: #ef9f76)>")" local text="$(get_tmux_option "@catppuccin<module_name>_text" "")"

local module=$( build_status_module "$index" "$icon" "$color" "$text" )

echo $module }