Shellmodoro is a simple Pomodoro timer script written in sh
(Bash-compatible).
It allows you to focus on tasks by setting a timer for work intervals (Pomodoros) and automatically reminds you when it's time to take a break.
It works on both macOS and Linux
It using native notification utilities for notifications and the terminal bell when no notification utility is available.
- Set a Pomodoro timer with a default duration of 25 minutes (customizable).
- Logs completed Pomodoro sessions with timestamps and notes.
- Supports notifications via
dunst
,notify-send
, orosascript
. - Rings the terminal bell when no notification utility is found.
- View and manage your Pomodoro log.
To complete the installation instructions for
Shellmodoro
, here’s how you can set it up fully after making it executable:
-
Download the script to your local machine:
wget https://raw.githubusercontent.com/5mdt/shellmodoro/refs/heads/main/shellmodoro.sh
-
Make the script executable:
chmod +x shellmodoro.sh
-
Move the script to a directory in your PATH (optional but recommended):
sudo mv shellmodoro.sh /usr/local/bin/shellmodoro
This step allows you to use
shellmodoro
from any directory. Otherwise, you’ll need to specify the full path to the script each time. -
Verify Installation:
To ensure
Shellmodoro
was installed correctly, check the help menu:shellmodoro -h
Run the script with an optional duration (in minutes) and notes.
./shellmodoro.sh [duration in minutes] [notes]
If no duration is provided, it defaults to 25 minutes.
Example 1: Start a 30-minute Pomodoro with notes:
./shellmodoro.sh 30 "Worked on project documentation"
Example 2: Start the default 25-minute Pomodoro without notes:
./shellmodoro.sh
To see a log of your past Pomodoro sessions, use the -l
or --log
option:
./shellmodoro.sh -l
To display the help message, use the -h
or --help
option:
./shellmodoro.sh -h
To see the script version, use the -v
or --version
option:
./shellmodoro.sh -v
The script automatically sends notifications using one of the following utilities:
- Dunst (Linux)
- notify-send (Linux, fallback if Dunst is not available)
- osascript (macOS)
If no notification utility is found, the script will ring the terminal bell instead.
-
Default Duration: The default Pomodoro duration is set to 25 minutes. You can override this by specifying a duration in minutes when running the script.
-
Log File: The log of completed Pomodoros is saved in a file located at
$HOME/pomodoro_log.txt
.
After starting a Pomodoro session, the script will notify you that the timer has started and will log your session once completed:
Pomodoro Started: Focus for 25 minutes!
Pomodoro Complete: Take a break!
After completion, the log file will contain an entry like:
2024-11-14T12:30:00UTC - Completed 25-minute Pomodoro. Notes: Worked on project documentation
This project is licensed under the AGPL v3 License - see the LICENSE file for details.
Feel free to fork this repository, make improvements, and submit pull requests. If you have any feature requests or bug reports, please open an issue.