Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions status/pomodoro_plus.sh
Original file line number Diff line number Diff line change
@@ -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"
}