Add a top-bar icon with a status menu, and a 2-hour off option #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "session/add-gnome-icon-with-status-and-o"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Pause runs in the background with nothing visible, so you can't tell whether breaks are on or how long until the next one without running
pause status. This adds a top-bar icon with a status menu. It also adds a "Turn Off for 2 Hours" option.What
pause/tray.py): an eye that's open while breaks are on and closed while they're off. Clicking it opens a menu:libayatana-appindicatoris GTK 3 only and can't be loaded alongside GTK 4.sudo dnf install gnome-shell-extension-appindicator). Without it there's no icon, and everything else works as before. Pause registers again whenever the watcher appears, so enabling the extension later or restarting the Shell needs no restart of Pause.install.shinstalls and uninstalls the two symbolic icons, and hints at the extension if it's missing. The README documents the setup.Testing
python3 -m unittest: all 25 pass. The newtests/test_tray.pyruns the tray on a private D-Bus with a fake watcher. It checks registration, properties, layout, click → action, and that signals fire only on changes.gdbusthe way the extension would: the layout was correct, "Turn Off for 2 Hours" turned breaks off until now + 2h and switched to the closed-eye icon, and "Quit Pause" stopped the app.install.sh/--uninstallagainst a throwaway HOME.🤖 Generated with Claude Code
https://claude.ai/code/session_01F7w6vnQked3XNiTdTZDP8r