simple timer i use for studying
README.md

Time Timer (libadwaita) #

A visual countdown timer modeled on the Time Timer, for people who struggle to sense time passing. A coloured disk shows the time left and shrinks clockwise toward 12 o'clock as time elapses.

Requirements #

  • Python 3, PyGObject (python-gobject / python3-gi), pycairo
  • GTK 4 and libadwaita 1.5 or newer (Adw.AboutDialog, Adw.PreferencesDialog, Adw.AlertDialog; developed against 1.9)
  • Optional: libXss for the X11 idle backend; the freedesktop sound theme (/usr/share/sounds/freedesktop) and GStreamer for the alert sound; without it a display beep is used

Run #

bin/time-timer
# or
python3 -m timetimer

For desktop integration copy data/io.github.timetimer.Adwaita.desktop to ~/.local/share/applications/ and the icon in data/icons/hicolor to ~/.local/share/icons/hicolor.

Using it #

The window is just the dial. There is no Start button: the countdown begins as soon as you set a time, with a start sound and a one-shot colour pulse (ring from the dial edge, brief wedge brighten; skipped when system animations are off) as confirmation. Nothing animates while it counts down except the wedge shrinking.

  • Set the time: drag on the dial and release. The chosen value is shown large above the center knob (unit below it) and fades about a second after you finish. Dragging snaps to the numbered marks (5 min on the 60 and 20 min faces, 10 min on the 120 min face, 1 min on the 5 min face) and the small minor ticks are hidden while you drag. Hold Shift while dragging for fine snapping (1 min; 5 s on the 5 min face) with the minor ticks shown; you can press or release Shift mid-drag. Dragging again while a countdown runs restarts it from the new value.
  • Scroll over the dial to add or remove time, one numbered step at a time (Shift: fine steps). The countdown starts when you stop scrolling. + / - follow the same rule. Note that + needs Shift on many keyboard layouts, which makes it a fine step; = and the keypad + give coarse steps.
  • Presets: pick one from the main menu; it starts immediately.
  • Clear: tap the clock face (a tap, not a drag), or press Escape / Delete. The wedge returns to 0 and the timer and alarm stop, with a soft low "bloop", a brief bump of the dial body, and "Timer Cleared" in the center for a second. Nothing happens when there is nothing to clear. Starting a drag replaces the message with the chosen time.
  • Alarm: when time is up the sound loops (up to a minute), the face flashes, a notification is sent and a Stop alarm button appears. It is the only button and is hidden otherwise.
  • Distraction-free screen (Preferences, on by default): while a countdown runs, after 10 seconds without keyboard or mouse input anywhere on the desktop, every monitor darkens to black while the dial inverts in place (a continuous morph of about 0.8 s, reversed on wake): it appears at exactly the position and size it has in the window, on that window's monitor only (inverted colours, the wedge keeps its colour); other monitors are plain black. Any pointer movement, key press, click or scroll fades it out again; it returns after another 10 idle seconds while the timer still runs. It also ends when the alarm rings or the timer is cleared. Desktop-wide idle time comes from GNOME's org.gnome.Mutter.IdleMonitor or, on X11, the XScreenSaver extension (libXss); on other desktops only input inside this app's own windows counts as activity. To place the dial exactly, the optional GNOME Shell extension WinRects (org.cua.WinRects) is used to read the window's position, because Wayland hides it from applications; without it the dial is centered on the monitor where the window last was (or the first monitor). WinRects also supplies a desktop capture: GNOME draws fullscreen windows as opaque, so the overlays paint that snapshot underneath and darken it; without the capture they fade in as a whole instead.
  • While a countdown runs the header bar fades out (the dial does not move); move the mouse to bring it back.
  • Main menu: preset times, face scale (5, 20, 60, 120 min), task label, Preferences, About.
  • Preferences: wedge colour, digital readout (hidden by default), sounds (alarm, start and clear), halfway and "5 minutes left" notifications.
Key Action
Escape, Delete Clear timer / stop alarm
+ / - Add / remove one numbered step (hold Shift: fine step)
Scroll wheel Same as + / -
Shift while dragging Fine snapping, minor ticks visible
Ctrl+, Preferences
Ctrl+Q Quit

The start sound is data/sounds/start.wav (converted to 16-bit PCM WAV from the supplied MP3, so no MP3 decoder is needed); data/sounds/clear.wav is a synthesized descending bloop played on clear. Both follow the "Sounds" preference.

Settings are stored in ~/.config/time-timer/settings.json.