Skip to content

feat: add custom command hooks for timer transitions#52

Open
thewatts wants to merge 2 commits intoolimorris:mainfrom
thewatts:feat/custom-hooks-on-timer-end
Open

feat: add custom command hooks for timer transitions#52
thewatts wants to merge 2 commits intoolimorris:mainfrom
thewatts:feat/custom-hooks-on-timer-end

Conversation

@thewatts
Copy link

@thewatts thewatts commented Mar 9, 2026

Closes #38

Summary

  • Adds three new tmux options: @pomodoro_on_complete_cmd, @pomodoro_on_break_end_cmd, and @pomodoro_on_long_break_end_cmd
  • These allow users to run custom commands when a Pomodoro completes, a break ends, or a long break ends
  • Commands run in the background so they don't block the timer

Example usage

set -g @pomodoro_on_complete_cmd 'tmux display-popup -E "echo Time for a break!; sleep 3"'
set -g @pomodoro_on_break_end_cmd 'tmux display-message "Break over — back to work!"'

Test plan

  • Added tests for run_custom_cmd (executes command, no-ops when empty)
  • All existing tests pass
  • Manual testing: set short timer with custom commands configured, verify they fire at each transition

🤖 Generated with Claude Code

thewatts and others added 2 commits March 6, 2026 23:34
Allow users to run custom commands when a Pomodoro completes, a break
ends, or a long break ends via three new tmux options:
@pomodoro_on_complete_cmd, @pomodoro_on_break_end_cmd, and
@pomodoro_on_long_break_end_cmd.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea:Ability to run a command when the timer finishes

1 participant