Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
3afa9ae054 Replace the eye icons with a pause sign and a plus
The eye read as creepy. The top-bar icon is now pause bars behind a plus,
in a ring, struck through while breaks are off; the app-grid icon shows
the same picture on the green tile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7w6vnQked3XNiTdTZDP8r
2026-10-26 14:24:38 +00:00
3b3b1c0f45 Fix top-bar icon showing as three dots
The AppIndicator extension looks up IconName with a fresh icon theme
whose search path is *only* our IconThemePath (data/icons), replacing
the system dirs. Without the system hicolor/index.theme it didn't know
about symbolic/apps, found nothing, and showed its "missing" placeholder.
GTK's own lookup keeps the system dirs, which is why this passed in
testing.

Ship an index.theme in data/icons/hicolor, and test that it lists the
folder the icons live in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7w6vnQked3XNiTdTZDP8r
2026-10-26 14:05:54 +00:00
6 changed files with 52 additions and 11 deletions

View file

@ -30,8 +30,8 @@ Remove it with `./install.sh --uninstall` (your notes are kept).
### Top-bar icon ### Top-bar icon
Pause puts an eye in the top bar: open while breaks are on, closed while Pause puts a pause sign with a plus in front in the top bar, struck
they're off. Click it for the time to the next break and *Take a Break Now*, through while breaks are off. Click it for the time to the next break and *Take a Break Now*,
*Turn Off for an Hour*, *Turn Off for 2 Hours*, *Turn Breaks Back On* and *Turn Off for an Hour*, *Turn Off for 2 Hours*, *Turn Breaks Back On* and
*Quit Pause*. *Quit Pause*.

View file

@ -0,0 +1,12 @@
# Pause hands this folder to the top-bar extension as IconThemePath, and the
# extension searches ONLY here, so it needs its own index to find the icons.
[Icon Theme]
Name=Hicolor
Comment=Pause's top-bar icons
Directories=symbolic/apps
[symbolic/apps]
Size=16
MinSize=8
MaxSize=512
Type=Scalable

View file

@ -1,5 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<!-- Closed eye: breaks are turned off. --> <!-- The "on" icon struck through: 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"/> <defs>
<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"/> <mask id="gap">
<rect width="16" height="16" fill="#fff"/>
<path stroke="#000" stroke-width="3.3" d="M1.5 1.5l13 13"/>
</mask>
</defs>
<g mask="url(#gap)">
<path fill="#2e3436" fill-rule="evenodd" d="M8 0.5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Zm0 1a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13Z"/>
<path fill="#2e3436" d="M4.4 3.6h1.4v2.5H4.4Zm0 6.3h1.4v2.5H4.4ZM10.2 3.6h1.4v2.5h-1.4Zm0 6.3h1.4v2.5h-1.4Z"/>
<path fill="#2e3436" d="M6.9 3.4h2.2v3.5h3.5v2.2H9.1v3.5H6.9V9.1H3.4V6.9h3.5Z"/>
</g>
<path stroke="#2e3436" stroke-width="1.3" stroke-linecap="round" d="M2.3 2.3l11.4 11.4"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 433 B

After

Width:  |  Height:  |  Size: 783 B

Before After
Before After

View file

@ -1,4 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> <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. --> <!-- Pause bars behind a plus, in a ring: 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"/> <path fill="#2e3436" fill-rule="evenodd" d="M8 0.5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Zm0 1a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13Z"/>
<!-- Bars, cut short where they would touch the plus's horizontal arm. -->
<path fill="#2e3436" d="M4.4 3.6h1.4v2.5H4.4Zm0 6.3h1.4v2.5H4.4ZM10.2 3.6h1.4v2.5h-1.4Zm0 6.3h1.4v2.5h-1.4Z"/>
<path fill="#2e3436" d="M6.9 3.4h2.2v3.5h3.5v2.2H9.1v3.5H6.9V9.1H3.4V6.9h3.5Z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 565 B

Before After
Before After

View file

@ -6,8 +6,8 @@
</linearGradient> </linearGradient>
</defs> </defs>
<rect x="8" y="8" width="112" height="112" rx="28" fill="url(#bg)"/> <rect x="8" y="8" width="112" height="112" rx="28" fill="url(#bg)"/>
<path d="M24 64 C40 38 88 38 104 64 C88 90 40 90 24 64 Z" fill="#fff"/> <!-- Same picture as the top-bar icon: pause bars behind a plus, in a ring. -->
<circle cx="64" cy="64" r="20" fill="#1f7a5c"/> <circle cx="64" cy="64" r="40" fill="none" stroke="#fff" stroke-width="7"/>
<rect x="56" y="54" width="6" height="20" rx="2" fill="#fff"/> <path fill="#fff" d="M40 40h9v9h-9Zm0 39h9v9h-9ZM79 40h9v9h-9Zm0 39h9v9h-9Z"/>
<rect x="66" y="54" width="6" height="20" rx="2" fill="#fff"/> <path fill="#fff" d="M55 36h18v19h19v18H73v19H55V73H36V55h19Z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 664 B

Before After
Before After

View file

@ -1,7 +1,9 @@
import configparser
import unittest import unittest
from gi.repository import Gio, GLib from gi.repository import Gio, GLib
from pause.app import ICON_DIR
from pause.tray import MENU_PATH, ITEM_PATH, WATCHER, MenuItem, Tray, separator from pause.tray import MENU_PATH, ITEM_PATH, WATCHER, MenuItem, Tray, separator
WATCHER_XML = Gio.DBusNodeInfo.new_for_xml(f""" WATCHER_XML = Gio.DBusNodeInfo.new_for_xml(f"""
@ -124,5 +126,19 @@ class TrayTest(unittest.TestCase):
self.assertEqual(sorted(signals), ["LayoutUpdated", "NewToolTip"]) self.assertEqual(sorted(signals), ["LayoutUpdated", "NewToolTip"])
class IconDirTest(unittest.TestCase):
def test_icons_findable_from_icon_theme_path_alone(self):
# The AppIndicator extension searches *only* IconThemePath, not the
# system icon dirs, so the theme there needs its own index.theme
# listing every folder an icon lives in.
index = configparser.ConfigParser()
self.assertTrue(index.read(ICON_DIR / "hicolor" / "index.theme"))
listed = index["Icon Theme"]["Directories"].split(",")
for name in ("net.reudy.Pause-symbolic", "net.reudy.Pause-off-symbolic"):
found = list((ICON_DIR / "hicolor").glob(f"*/*/{name}.svg"))
self.assertEqual(len(found), 1, name)
self.assertIn(str(found[0].parent.relative_to(ICON_DIR / "hicolor")), listed)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()