Minimal break/pomodoro reminder tray app (C++ ImGui + GLFW + GTK tray)
  • C++ 79.4%
  • C 16.6%
  • Makefile 2.3%
  • Nix 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-09 04:13:37 -04:00
src paused breaks also pause the late-night reminders: while a pause is active do not fire the late-night overlay or notification, and recenter the interval so one does not pop up the instant the pause ends 2026-09-09 04:13:37 -04:00
third_party vendor imgui + tray as tracked files 2026-09-02 13:24:07 -04:00
.envrc seagrass: initial minimal Pomodoro + late-night-reminder tray app 2026-09-02 13:23:40 -04:00
.gitignore gitignore imgui.ini runtime artifact 2026-09-02 13:43:09 -04:00
flake.lock flake: fix shellHook (drop mesa.dev); add lockfile 2026-09-02 13:25:44 -04:00
flake.nix rename Pomodoro to work breaks in comments, flake description, and README 2026-09-02 15:44:24 -04:00
icon.png icon: placeholder SG monogram tray icon 2026-09-02 13:32:29 -04:00
Makefile split the source into focused modules; each now lives where it makes sense (state, config, notify, timer, ui, tray, window) coordinated through a shared app.h interface and the single App g state. Pure structural move: no behavior change, full build verified 2026-09-07 21:41:13 -04:00
README.md split the source into focused modules; each now lives where it makes sense (state, config, notify, timer, ui, tray, window) coordinated through a shared app.h interface and the single App g state. Pure structural move: no behavior change, full build verified 2026-09-07 21:41:13 -04:00

seagrass

A minimal, low-resource work-breaks + late-night-reminder app that lives in the system tray. Written in C++ with Dear ImGui (stock look) and a zserge/tray icon.

Features

  • Work breaks — work → short break → … → long break, configurable (minutes and seconds).
  • Late-night warnings — after a configurable hour, nudges you to consider stopping, every N minutes.
  • System tray icon (GTK/appindicator on Linux).
  • GUI settings panel — every toggle and value below is adjustable there.
  • Break delivery: desktop notification or a fullscreen overlay window.
  • Custom message pools — separate pools for work vs late-night, each a list separated by three newlines (\n\n\n); a random entry is shown each time.
  • Fullscreen overlay is customizable (background color + messages).
  • Pause breaks for a configurable length (hours / minutes / seconds).
  • Idle render policy — sleeps instead of rendering when nothing changes (battery friendly).

Build

Dependencies are provided by the nix devShell:

nix develop        # enter the dev shell
make               # build -> ./seagrass
make run           # build + run

Without nix, install gcc, pkg-config, glfw3, glew, gtk3, libappindicator-gtk3 and run make.

Layout

The source is split into small modules, all coordinated through src/app.h and the shared App g state (src/state.cpp). ImGui/GLFW/GTK live on different threads and communicate only through the atomics in App.

  • src/main.cpp — entry point: config, single-instance lock, thread spawn
  • src/app.h — shared internal interface (cross-module declarations)
  • src/seagrass.h — Settings + App shared-state types
  • src/state.cpp — the process-wide App g + small pure helpers
  • src/config.cpp — XDG config persistence (~/.config/seagrass/config)
  • src/notify.cpp — libnotify queue (emitted on the main GTK thread)
  • src/timer.cpp — the pomodoro / late-night timer engine
  • src/ui.cpp — ImGui settings panel + fullscreen break overlay
  • src/tray.cpp — tray icon/menu + main-thread GTK loop (incl. freeze watchdog)
  • src/window.cpp — the GLFW/ImGui window loop (worker thread)
  • third_party/imgui/ — vendored Dear ImGui (pinned)
  • third_party/tray/ — vendored zserge/tray (pinned)
  • icon.png — placeholder tray icon ("SG" monogram). Drop the real logo here (same filename, PNG) when you've designed it; the app loads it from cwd.
  • Makefile, flake.nix

Roadmap (later)

  • Cross-platform tray/notification backends (macOS / Windows)