diff --git a/README.md b/README.md index 02eb8fa..3228064 100644 --- a/README.md +++ b/README.md @@ -456,6 +456,27 @@ To customize the gitmux module, you can follow the instrucctions in the [gitmux set -g @catppuccin_gitmux_text "#(gitmux -cfg $HOME/.gitmux.conf \"#{pane_current_path}\")" ``` +### Pomodoro module + +#### Requirements +This module depends on [tmux-pomodoro-plus](https://github.com/olimorris/tmux-pomodoro-plus/tree/main). + +#### Install +The preferred way to install tmux-pomodoro-plus is using [TPM](https://github.com/tmux-plugins/tpm). + +#### Configure +Load tmux-pomodoro-plus after you load catppuccin. +```sh +set -g @plugin 'catppuccin/tmux' +... +set -g @plugin 'olimorris/tmux-pomodoro-plus' +``` + +Add the pomodoro module to the status modules list. +```sh +set -g @catppuccin_status_modules_right "... pomodoro_plus ..." +``` + ## Create a custom module diff --git a/status/pomodoro_plus.sh b/status/pomodoro_plus.sh new file mode 100644 index 0000000..a9da264 --- /dev/null +++ b/status/pomodoro_plus.sh @@ -0,0 +1,14 @@ +# Requires https://github.com/olimorris/tmux-pomodoro-plus + +show_pomodoro_plus() { + local index icon color text module + + index=$1 + icon="$( get_tmux_option "@catppuccin__icon" "" )" + color="$( get_tmux_option "@catppuccin__color" "$thm_orange" )" + text="$( get_tmux_option "@catppuccin__text" "#{pomodoro_status}" )" + + module=$( build_status_module "$index" "$icon" "$color" "$text" ) + + echo "$module" +}