Simple Pomodoro with Gosu and Ruby

The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s. The technique uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks. These intervals are called pomodoros, the plural in English of the Italian word pomodoro, which means tomato. The method is based on the idea that frequent breaks can improve mental agility. (Wikipedia)

This is just a simple Pomodoro with a minimal graphical interface made in Ruby with the help of Gosu made for fun.



Due to the fact that the gem uses Gosu to launch the graphical interface, you have to install first the Gosu dependencies:

For Mac OS X

Gosu is built on top of the SDL 2 library. I recommend installing Homebrew and then running brew install sdl2.

For Linux

You will need the following packages, even though the names will be different in every distribution: libsdl2-dev, libsdl2-ttf-dev, libpango1.0-dev, libgl1-mesa-dev, libfreeimage-dev, libopenal-dev, libsndfile-dev.

More info about this dependencies here: Gosu's Wiki

Then, you can install the gem as any other gem:

$ gem install pomodoro-gui


Once installed, you can see from the terminal all the options by typing pomodoro-gui -h:

Usage: pomodoro-gui [options]  
    -r, --rest [REST]                Choose rest time (in minutes)
    -i, --interval [INTERVAL]        Choose pomodoro length time (in minutes)
        --version                    Show version
    -h, --help                       Show this message

To start the pomodoro with the default values, just simply execute pomodoro-gui. The default values are 25 minutes for the pomodoros, and 5 minutes for the rest's periods.

Any place where I can see the code?

Yeah! Here you have the Github repo for this example, so you can clone it, change it, play with it... whatever you want! :)