3.7 KiB
Gomodoro
Gomodoro is a customizable Pomodoro timer written in Go. It allows you to set focus and break intervals, and run custom shell commands at the start and end of each focus period, as well as at the end of each interval. The application can be run in fullscreen mode and provides a visual progress bar to track your focus and break times.
Features
- Customizable focus and break durations
- Customizable number of intervals
- Ability to run shell commands at the start and end of focus periods, and at the end of each interval
- Fullscreen mode for distraction-free focus
- Visual progress bar with customizable colors
Installation
To install Gomodoro, you need to have Go installed on your machine. Then, you can clone the repository and build the application:
git clone https://github.com/iamthefij/gomodoro.git
cd gomodoro
make build
Usage
You can run Gomodoro from the command line with various options to customize your Pomodoro sessions.
Command Line Options
--on-focus-start
: Command(s) to run when focus starts--on-focus-end
: Command(s) to run when focus ends--on-interval-end
: Command(s) to run when any interval ends--fullscreen
: Enable fullscreen mode--focus
: Focus time duration (default prompt for input)--break
: Break time duration (default prompt for input)--intervals
: Number of intervals (default prompt for input)--color-left
: Left color for progress bar (default:#ffdd57
)--color-right
: Right color for progress bar (default:#57ddff
)--version
: Show version
Examples
Basic Usage
Run Gomodoro and follow the prompts to enter your Pomodoro settings:
./gomodoro
Set Focus and Break Durations
Set focus time to 25 minutes and break time to 5 minutes:
./gomodoro --focus=25m --break=5m
Set Number of Intervals
Set the number of intervals to 4:
./gomodoro --intervals=4
Run Commands on Focus Start and End
Run a command when focus starts and another when focus ends:
./gomodoro --on-focus-start="echo Focus started" --on-focus-end="echo Focus ended"
Fullscreen Mode
Run Gomodoro in fullscreen mode:
./gomodoro --fullscreen
Custom Progress Bar Colors
Set custom colors for the progress bar:
./gomodoro --color-left="#ff0000" --color-right="#00ff00"
Some Pro Tips!
- Use the
--on-focus-start
and--on-focus-end
options to run commands that help you get into the zone and wind down after a focus period or to control your environment (e.g., turning off notifications).
My example usage
I used Shortcuts on my mac to control macOS Focus mode. I named them "Turn On Focus" and "Turn Off Focus". This allows my focus start and end commands to control my notifications for my computer and phone (since I have them synced).
I also use Slack Status CLI to set my Slack status to a snooze mode with a tomato emoji when I'm in focus mode and turn it off after.
gomodoro \
--fullscreen \
--color-left '#ecdfb1' \
--color-right '#c6e889 ' \
--on-focus-start "shortcuts run 'Turn On Focus'" \
--on-focus-start "say 'Time to focus'" \
--on-focus-start "slack-status -snooze -duration 1h -emoji :tomato: Focus" \
--on-focus-end "shortcuts run 'Turn Off Focus'" \
--on-focus-end "say 'Break time you slacker'" \
--on-focus-end "slack-status" \
--on-interval-end "say 'Interval done! Phew!'"
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Author
Gomodoro is developed by iamthefij.