- Shell 80.5%
- Nix 14.6%
- Python 4.9%
"Productivity Management Done Right"
p🍅m🍅d🍅r🍅
Built with Nix Please don't upload to GitHub
pmdr is the lightweight pomodoro script that gets it done. Run it from the CLI for a manual session, or go hog-wild and integrate it with other productivity tools.
Features
- Versatile! Status bar-ready. (This is the killer feature.)
- Meticulous! Logs your session history in a standardized format.
- Configurable! Choose your own intervals, notification messages, and more.
- Handy! Its simple CLI provides the subcommands YOU want.
- Portable! It's a lightweight Bash script.
- Plays for points! Strongly copylefted with GNU AGPLv3.
Installation
If you have Nix, you can simply run it with a one-liner:
nix run "git+https://codeberg.org/ctem/pmdr?ref=consent"
If you're on NixOS, you can add this repository as a flake input.
Otherwise, just make sure you have pmdr's runtime dependencies, which you can find listed as packages in flake.nix or programs in pmdr itself. Then, just grab the script and run it, perhaps using one of these fine one-liners:
-
curl -sSL https://codeberg.org/ctem/pmdr/raw/consent/pmdr | bash -
wget -qO- https://codeberg.org/ctem/pmdr/raw/consent/pmdr | bash
Setup
For manual CLI usage, you're already good to go.
However, why stop there when you can make it a status bar module...
- polybar
config.ini:[module/pmdr] click-left=kill -USR1 %pid% exec=/path/to/pmdr d tail=true type=custom/script
...and interface with it via a Taskwarrior hook! (Check out extras/on-modify.pmdr.)
You've had better? I think not!
Usage
Subcommands:
s, start start or restart a session
f, finish force finish the active session; start the next break
t, task start a session if one is not currently active
TIP: useful as a task start hook
d, display print current status
TIP: useful as a status bar module
q, quit stop task(s) and quit pmdr
v, version print version information
h, help print help information
Configuration
pmdr reads several environment variables. To whet your appetite, this section includes a few example snippets. Note: the syntax is for Bourne-compatible shell configuration files such as .bashrc, .bash_profile, .zshenv, or .zprofile.
Timing
New to the technique? Experiment with different durations and intervals to see what works best for you.
- Classic (25/5): The original, balanced for beginners [default]
export SESSION_DURATION=25 export SHORT_BREAK_DURATION=5 export LONG_BREAK_DURATION=15 export LONG_BREAK_INTERVAL=4 - Extended (50/10): Sustained attention for complex tasks
export SESSION_DURATION=50 export SHORT_BREAK_DURATION=10 - Focus (90/20): Intensive work on larger projects with multiple components
export SESSION_DURATION=90 export SHORT_BREAK_DURATION=20 - Micro (15/3): Short bursts for quick tasks
export SESSION_DURATION=15 export SHORT_BREAK_DURATION=3
Formatting
You can customize the notification messages. Here are some example sets:
- Generic [default]
export PMDR_NEW_SESSION_MSG='Focus session activated' export PMDR_LONG_BREAK_MSG='Mode switch: Long break' export PMDR_SHORT_BREAK_MSG='Mode switch: Short break' export PMDR_IDLE_MSG='Mode switch: Idling...' export PMDR_MID_SESSION_MSG='Continuing active session' export PMDR_MID_BREAK_MSG='Continuing break' export PMDR_NO_SESSION_MSG='No active session!' export PMDR_QUIT_MSG='Bye!' - Motivational
export PMDR_NEW_SESSION_MSG='Let’s do this!' export PMDR_LONG_BREAK_MSG='Time to recharge!' export PMDR_SHORT_BREAK_MSG='Take a quick breather...' export PMDR_IDLE_MSG='Ready to resume focus?' export PMDR_MID_SESSION_MSG='You’re on a roll!' export PMDR_MID_BREAK_MSG='You’re already on break. Enjoy!' export PMDR_NO_SESSION_MSG='No active session. Ready to start a new one?' export PMDR_QUIT_MSG='Great focus! Now it’s time to unwind.' - Hashtags
export PMDR_NEW_SESSION_MSG='#FocusTime' export PMDR_LONG_BREAK_MSG='#LongBreak' export PMDR_SHORT_BREAK_MSG='#QuickBreak' export PMDR_IDLE_MSG='#IdleAlert' export PMDR_MID_SESSION_MSG='#InTheZone' export PMDR_MID_BREAK_MSG='#AlreadyOnBreak!' export PMDR_NO_SESSION_MSG='#NoSession!' export PMDR_QUIT_MSG='#ByeForNow' - Kaomoji
export PMDR_NEW_SESSION_MSG='(ง •̀_•́)ง' export PMDR_LONG_BREAK_MSG='(っ ́ω`c)' export PMDR_SHORT_BREAK_MSG='(。•̀ᴗ-)✧' export PMDR_IDLE_MSG='(•̀ᴗ•́)و' export PMDR_MID_SESSION_MSG='(ノ◕ヮ◕)ノ*:・゚✧' export PMDR_MID_BREAK_MSG='( ́。• ᴗ •。`)' export PMDR_NO_SESSION_MSG='( ̄▽ ̄)ノ' export PMDR_QUIT_MSG='( ́▽`ʃ♡ƪ)' - Name that film
export PMDR_NEW_SESSION_MSG='"Let’s get it on!"' export PMDR_LONG_BREAK_MSG='"This is where the healing begins."' export PMDR_SHORT_BREAK_MSG='"You’ve been working hard. Take a break."' export PMDR_IDLE_MSG='"Wake up, little snoozy! Smell the smelling salts!"' export PMDR_MID_SESSION_MSG='"I set ’em up, you knock ’em down."' export PMDR_MID_BREAK_MSG='"Everything was going so well..."' export PMDR_NO_SESSION_MSG='"I don’t even know you."' export PMDR_QUIT_MSG='"This concludes our broadcast day. Click!"'
Break notifications are additionally equipped with a "message body" designed to grab your attention. Feel free to restyle it from the adorable Unicode default:
export PMDR_MSG_BODY='
/> フ
| _ _|
/` ミ_xノ
| | |
\二)
'
You can also customize icons for notifications and status messages. For example:
# Notification icons
export PMDR_BREAK_NOTIFICATION_ICON='🍵' # Default: '🏖'
export PMDR_SESSION_NOTIFICATION_ICON='' # Default: '🍅'
# Status icons
export PMDR_SESSION_STATUS_ICON='⏲' # Default: ''
export PMDR_BREAK_STATUS_ICON='☕' # Default: ''
export PMDR_IDLE_STATUS_ICON='❗' # Default: ''
Contributing
Contributions are welcome! Why do today what you can put off till tomato?
ミ🍅