Incorporate the Pomodoro technique into your tmux setup. Forked from Tmux Pomodoro
- Toggle pomodoro timer on/off and see the countdown in the status bar
- Upon completion of a pomodoro, see a break countdown in the status bar
- Desktop alerts for pomodoro and break completion (macOS and Linux only)
- Customise the pomodoro duration and break times
- Automatically repeat your pomodoros
- Custom keybindings
Pomodoro counting down in real-time:
- Using TPM, add the following line to your
~/.tmux.conf
file:
set -g @plugin 'olimorris/tmux-pomodoro-plus'
Note: The above line should be before
run '~/.tmux/plugins/tpm/tpm'
- Then press
tmux-prefix
+ I (capital i, as in Install) to fetch the plugin as per the TPM installation instructions
Note: It's possible to bind start and cancel to the same key!
<tmux-prefix> p
to start a pomodoro/break<tmux-prefix> P
to cancel a pomodoro<tmux-prefix> C-p
to open the pomodoro timer menu<tmux-prefix> M-p
to set a custom pomodoro timer
The pomodoro timer menu and custom pomodoro input are always <ctrl>/<alt> + [your start pomodoro key]
.
To incorporate into your status bar:
set -g status-right "#{pomodoro_status}"
Note: On Linux, notifications depend on
notify-send/libnotify-bin
The default configuration:
set -g @pomodoro_start 'p' # Start a Pomodoro or start break with tmux-prefix + p
set -g @pomodoro_cancel 'P' # Cancel a Pomodoro with tmux-prefix key + P
set -g @pomodoro_mins 25 # The duration of the pomodoro
set -g @pomodoro_break_mins 5 # The duration of the break after the pomodoro
set -g @pomodoro_repeat false # Auto-repeat the pomodoro? False by default
set -g @pomodoro_auto_start_break true # Auto-start break when pomodoro end? True by default
set -g @pomodoro_on " π
" # The formatted output when the pomodoro is running
set -g @pomodoro_ask_break " π€ break?" # The formatted output when wait to start break
set -g @pomodoro_complete " β
" # The formatted output when the break is running
set -g @pomodoro_notifications 'off' # Enable desktop notifications from your terminal
set -g @pomodoro_sound 'off' # Sound for desktop notifications (Run `ls /System/Library/Sounds` for a list of sounds to use on Mac)
set -g @pomodoro_granularity 'off' # Enables MM:SS (ex: 00:10) format instead of the default (ex: 1m)
The output from the plugin can be completely customised to fit in with your status line. For example:
set -g @pomodoro_on "#[fg=$text_red]π
"
set -g @pomodoro_complete "#[fg=$text_green]π
"
set -g @pomodoro_ask_break "#[fg=$color_gray]π€ ? "
A real-time countdown can also be enabled in the status line:
set -g @pomodoro_granularity 'on'
set -g status-interval 1 # Refresh the status line every second
- Starting a Pomodoro:
- Uses
date +%s
to get the current timestamp and write to/tmp/pomodoro.txt
- This allows the app to keep track of the elapsed time
- Uses
- Completing a Pomodoro:
- Writes the status of the pomodoro to
/tmp/pomodoro_status.txt
- This allows the app to know what type of notification to send
- Writes the status of the pomodoro to
- Cancelling a Pomodoro:
- Deletes
/tmp/pomodoro.txt
- Deletes
/tmp/pomodoro_status.txt
- Deletes
- Getting the status of a Pomodoro:
- Countdown: Compares current timestamp (via
date +%s
) with the start timestamp in/tmp/pomodoro.txt
- Break: Compares the current timestamp with the start timestamp and adds on the break duration
- Countdown: Compares current timestamp (via
- Wladyslaw Fedorov - For the squashed tomato image