Skip to content
dominikmayer edited this page Jun 19, 2011 · 16 revisions

Pymodoro allows you to add Pomodoro session information into your Xmobar (or dzen). It is designed to be used by Pomodoro practitioners who are also using XMonad, AWM or other tiling window managers. It will look like this:

When you are starting a new Pomodoro

Pymodoro screenshot start

When you are nearly done with your Pomodoro

Pymodoro screenshot

News

  • Support for multiple counters with different times added.
  • Support for breaks and command line arguments added.

Older

  • I added support for sound to play at the end of a session, you simply need to have aplay. I also ship a couple of .wav files for you to try. Of course, as long as you can aplay your file in the command line, you can use it.
  • I added a wiki page on certain Tricks that you can do with Pymodoro

Install

To install, simply put the files into a new folder called .pymodoro inside your home folder. Configure your xmobar to display pymodoro with

Run CommandReader "~/.pymodoro/pymodoro.py" "pomodoro"

Then add it to your template.

Usage

A new Pomodoro -- 25 minutes followed by a break of 5 minutes -- is started by changing the timestamp of ~/.pomodoro_session. This can be done by the shell command:

touch ~/.pomodoro_session

If you want to use counters with different times, write them into the session file. The first number specifies the length of the Pomodoro in minutes, the second one the length of the break. Both numbers are optional. Example:

echo "20 2" > pomodoro_session

Keybindings

The easiest way is to define keybindings for the commands.

Xmonad

Configure xmonad to start a new Pomodoro session by adding this to your xmonad.hs:

-- start a pomodoro
, ((modMask              , xK_n     ), spawn "touch ~/.pomodoro_session")

Or:

-- start a pomodoro
, ("M-n", spawn "touch ~/.pomodoro_session")

This way, whenever you hit modMask + n, you will start a new pomodoro.

Configure

You can set all the options via command line paramters. For a detailed description run:

~/.pymodoro.py --help

It is no longer needed to edit the script itself. If you still want to do it, open up the file ~/.pymodoro/pymodoro.py.

Missing features

I will add support for the following features in future releases

  • Support for blinking when done with xmobar

  • Support for a pomodoro image instead of the letter 'P' when used with dzen