Add a top-bar icon with a status menu, and a 2-hour off option

Pause now shows an eye in the GNOME top bar (open while breaks are on,
closed while they're off). Its menu shows the time to the next break and
offers Take a Break Now, Turn Off for an Hour / for 2 Hours, Turn Breaks
Back On and Quit.

It speaks StatusNotifierItem + dbusmenu over the app's own D-Bus
connection, so it needs the AppIndicator Shell extension (packaged in
Fedora) but no extra Python dependencies; libayatana-appindicator is
GTK 3 only and can't share a process with GTK 4. Without the extension
the icon just doesn't appear. Pause re-registers whenever the watcher
appears, so enabling the extension later or restarting the Shell works.

"Turn Off for 2 Hours" is also added to the app-grid right-click menu
and the status notification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7w6vnQked3XNiTdTZDP8r
This commit is contained in:
agent 2026-10-26 13:37:35 +00:00
parent fdd43c389b
commit 1bcbbfd8be
8 changed files with 500 additions and 9 deletions

View file

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<!-- Closed eye: breaks are turned off. -->
<path fill="#2e3436" d="M0.6 6.6C2 9.4 4.8 11.2 8 11.2s6-1.8 7.4-4.6L14 5.9C12.9 8.2 10.6 9.7 8 9.7S3.1 8.2 2 5.9Z"/>
<path fill="#2e3436" d="M7.3 10.5h1.4v3.3H7.3ZM3.9 9.9l1.3.5-1.1 2.7-1.3-.5ZM12.1 9.9l-1.3.5 1.1 2.7 1.3-.5ZM1.4 8.4l1.1.9-1.6 1.9-1.1-.9ZM14.6 8.4l-1.1.9 1.6 1.9 1.1-.9Z"/>
</svg>

After

Width:  |  Height:  |  Size: 433 B

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<!-- Open eye with pause bars in the pupil: breaks are on. -->
<path fill="#2e3436" fill-rule="evenodd" d="M8 3C4.4 3 1.6 5.3 0.4 8 1.6 10.7 4.4 13 8 13s6.4-2.3 7.6-5C14.4 5.3 11.6 3 8 3Zm0 1.5c-2.6 0-4.8 1.5-5.9 3.5 1.1 2 3.3 3.5 5.9 3.5s4.8-1.5 5.9-3.5c-1.1-2-3.3-3.5-5.9-3.5ZM8 5.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6ZM6.7 6.6h1v2.8h-1Zm1.6 0h1v2.8h-1Z"/>
</svg>

After

Width:  |  Height:  |  Size: 458 B