1
0
Fork
You've already forked pmdr
0
A lightweight, configurable pomodoro script that can be used as a status bar module
  • Shell 80.5%
  • Nix 14.6%
  • Python 4.9%
Find a file
Ctem 3eaec172e6
build(flake): install Taskwarrior hook
Further optimizations to the package's installation phase include:
- explicit specification of target base paths (for `install -D` to
 create)
- removal of redundant `mkdir` line
2025年01月17日 09:59:02 +00:00
extras ops(extras): add Taskwarrior hook 2021年07月16日 15:49:53 +00:00
LICENSES ops(licensing): add license files 2021年07月02日 11:25:53 +00:00
.editorconfig ops: add EditorConfig file 2021年07月02日 11:27:50 +00:00
.envrc ops(nix-direnv): add latest source to config 2025年01月16日 18:10:23 +00:00
.gitattributes ops: add Git attributes 2021年07月02日 11:29:10 +00:00
.gitignore ops: add nix-direnv configuration 2021年07月02日 19:25:05 +00:00
CHANGELOG.md ops(version): bump to 0.2.0 2021年07月24日 09:40:28 +00:00
flake.lock build(flake): migrate to flake-parts 2025年01月16日 17:50:55 +00:00
flake.nix build(flake): install Taskwarrior hook 2025年01月17日 09:59:02 +00:00
pmdr feat: add critical message body 2025年01月11日 07:25:39 +00:00
README.md docs(readme): update configuration section 2025年01月11日 08:03:08 +00:00
REUSE.toml ops(licensing): replace DEP5 with REUSE.toml 2025年01月04日 12:08:05 +00:00

"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?

🍅