Add support to tmux-pomodoro-plus plugin in status bar (#241)

* Add support to tmux-pomodoro-plus plugin in status bar

* Update README.md with setup information for the pomodoro module
This commit is contained in:
Daniel Nocito 2024-07-02 12:13:24 -03:00 committed by GitHub
parent e7cd05facc
commit 893917360d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 0 deletions

View file

@ -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}\")" 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 ## Create a custom module

14
status/pomodoro_plus.sh Normal file
View file

@ -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_<module_name>_icon" "" )"
color="$( get_tmux_option "@catppuccin_<module_name>_color" "$thm_orange" )"
text="$( get_tmux_option "@catppuccin_<module_name>_text" "#{pomodoro_status}" )"
module=$( build_status_module "$index" "$icon" "$color" "$text" )
echo "$module"
}