Notes on seeking wisdom and crafting software

Pomodoro in Polybar and i3

A few weeks back I setup a pomodoro workflow on my primary desktop running i3↗, polybar↗ and Archlinux↗. The flow and scripts are built around the uair↗ pomodoro app.

Pomodoro workflow
The user controls pomodoro using hotkeys bound in i3wm config. Polybar uses a custom module to read the state. uair is the pomodoro timer CLI app.
  1. We defined two types of sessions in uair config↗. Both are hooked to a shell script (see step 4 & 5).
  2. User has configured hotkeys to toggle sessions (break or work) and start/stop them in i3 config↗.
  3. Hotkeys run the uairctl command to instruct uair - change current session, or toggle its running state.
  4. uairctl passes the instruction to uair.
  5. On a session start, uair will invoke the configured shell scripts.
  6. These scripts may store some state in a file, e.g., session count.

Polybar is configured↗ to read uair output via the pomo.sh↗ shell script. On start this script will run uair command.

I think this flow is a good example of composing tools that just do one thing well to build complex workflows. Hope our AI workflows will also be this simple and composable someday!