Pomodoro Timer

A Pomodoro Timer for OBS Studio (pomodoro-logger.py)

A simple command-line tool to write a pomodoro timer in a log file to integrate the timer in OBS (Text(GDI+)). The following screenshot illustrates the display merged with OBS Studio with the Pomodoro timer line in Courier New at the top:

Python Script pomodoro-logger.py

This is a small Python script that writes text (text with date) to a log file. You can use this log file for OBS, to record working hours or to analyse your “action times”. The code is published on github ( https://github.com/fackelm2/pomodoro-logger)

The text file “pomodoro.log” is generated by using the Python logging mechanism. Caution: The log file will grow (one entry every second) while the script is running.

To start the Pomodoro timer you must:

  • download the Python Script
  • start python script
# python pomodoro-logger.py

The script will automatically start to writing the timer data line by line to the file “pomodoro.log” in the same directory as the script:

  • Stop the Python script with “ c"
# <ctrl c>


Change Settings

To change the Pomodoro settings you can change the number of rounds, the “action time” (minutes) and the “relax time” (minutes) by changing the following constants in the main() part of the Python script:

pomorounds = 4          # set number of pomodoro rounds ..
pomoactiontime = 30     # set minutes to focus
pomorelaxtime = 5       # set minutes for break time


Pomodoro Log file

As an example, the Python script will write the following to the log file

# more pomodoro.log
[16.09.2023 21:05] start 4 pomodoro rounds (20m 5m)
...
[16.09.2023 22:31] 4/4    action      relax    08:53
[16.09.2023 22:31] 4/4 -> action <-   relax    08:52
[16.09.2023 22:31] 4/4    action      relax    08:51
[16.09.2023 22:31] 4/4 -> action <-   relax    08:50
...


OBS Studio integration

The Pomodoro log file can be used with OBS Studio (Open Broadcaster Software) as a Pomodoro timer. The following image show the screen with the log file entries at the top of the image.


OBS configuration

First execute the script a few seconds to generate the log file the first time. Start OBS an choose your “Szene” to add the pomodoro counter

  • add “Text(GDI+)” to a “OBS Szene”
  • activate “Aus Datei lesen”
  • choose “pomodoro.log” file from you location of the python script


OBS Fine Tuning (OBS Configuration Options)

Schriftart: "Courier New Standard" (Size 70)
Aus Datei lesen (aktiv)
Antialiasing aktivieren (aktiv)
Farbe: "#ffffff"
Deckkraft "90%"
Hintergrundfarbe "#000000"
Hintergrunddeckkraft "70%"
Ausrichtung "Zentriert"
Vertikale Ausrichtung "Zentriert"
Kontur (aktiv)
Konturgröße "2"
Konturfarbe "#a5a5a5"
Konturdeckkraft "100%"
Chatlogmodus (aktiv)
Chatlogzeilenlimit "1"
Benutzerdefinierten Textbereich benutzen (aktiv)
Breite "3000"
Höhe "90"
Zeilenumbruch (DEAKTIV)