Skip to content

An X11 menu to control `pomod`

License

Notifications You must be signed in to change notification settings

morgant/xpomodmenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xpomodmenu

by Morgan Aldridge morgant@makkintosshu.com

OVERVIEW

A minimal set of X11 utilities which interact with & control Lucas de Sena's pomod pomodoro timer server & client: xpomodbell & xpomodmenu. They are powered by several other tools by Lucas de Sena, including wmlaunchbutton & xmenu, plus mpv for audio playback. They are intended for use with the MLVWM window manager, specifically the mlvwmrc configurations, as a "Menu Extra" swallowed into the menu bar.

FEATURES

  • xpomodbell:
    • Launches pomod and monitors it for pomodoro cycle changes
    • Plays bell sounds at the start of a new cycle:
      • Three temple bells when beginning a pomodoro (focus)
      • A single temple bell when beginning a break (short or long)
  • xpomodmenu:
    • Shows the current state of pomod (configuration error, stopped, or current pomodoro cycle)
    • Shows the elapsed time in the current pomodoro cycle
    • Supports starting/stopping the current pomodoro cycles
    • Supports launching a floating window showing the current pomodoro cycle and elapsed time
  • xpomoinfo:
    • Shows a floating window with:
      • The current state of pomod (stopped or current pomodoro cycle) in the window title
      • The elapsed time in the current pomodoro cycle in the window
  • mlvwmrc:
    • Menu Extra:
      • Provides an icon in the MLVWM menu bar which will show the xpomodmenu when clicked on
    • Application Styles:
      • Provides icon & window styling for xpomoinfo floating window

PREREQUISITES

INSTALLATION

make && make install

Menu Extra

Install the Menu Extra in your ~/.mlvwm/MenuExtras/ directory by running:

make install-mlvwmrc-menuextra

Next, edit your ~/.mlvwm/apps/.AppsManifest configurationfile to add the following line:

Read .mlvwm/apps/xpomoinfo

Next, edit your ~/.mlvwm/MenuBar configuration file to add the following line in the appropriate "Menu Extras" section:

Read .mlvwm/MenuExtras/xpomodmenu

Finally, restart mlvwm.

USAGE

Starting the Bell Server

While you can just start the xpomod server directly and xpomodmenu will work with it, you'll want to start the bell server which will play a notification sound when starting a new pomodoro focus or break cycle. The bell server will start the xpomod server to monitor for pomodoro cycle changes:

xpomodbell

Since this is intended to be used with mlvwmrc, it's suggested that you add the following line to your ~/.mlvwm/.initrc configuration:

Exec "xpomodbell" exec /usr/local/bin/xpomodbell &

Options

xpomodbell does support a few command line options. Run xpomodbell -h for help.

Bell Sound Volume

You can specify the volume at which to play the bell notification sound by passing in a percentage (0..100) with the -V option (the default is 100). For example:

xpomodbell -V 75
Pomodoro Work & Break Duration

You can specify the duration of the pomodoro work cycle by passing in a number of minutes (default is 25) with the -p option. Similarly, the short & long break durations by passing in a number of minutes with the -b (short) and -B (long) options (default is 5 for short break and 30 for long break). For example:

xpomodbell -p 50 -b 15 -B 60

The Pomodoro Menu

You can manually execute xpomodmenu in any way you prefer, which will show the pomodoro menu at your cursor. These instructions assume you've installed the Menu Extra as described in the installation instructions and click on the icon in the MLVWM menu bar to open the menu.

TBD

CHANGE LOG

See CHANGELOG.md for detailed version history.

LICENSE

Released under the MIT license.

Mark James' FamFamFam Silk Icons licensed under the Creative Commons Attribution 2.5 License.

Keisu temple bell by milivolt licensed under the Creative Commons Attribution 4.0 License.

temple_bell_002.wav by tec_studio -- https://freesound.org/s/668647/ -- License: Creative Commons 0 temple_bell_002.wav by tec_studio licensed under the Creative Commons Zero 1.0 License.