Fix tray on GNOME/Wayland: use libappindicator instead of Gtk.StatusIcon#2
Open
GaimsDevSoftware wants to merge 1 commit into
Open
Fix tray on GNOME/Wayland: use libappindicator instead of Gtk.StatusIcon#2GaimsDevSoftware wants to merge 1 commit into
GaimsDevSoftware wants to merge 1 commit into
Conversation
The tray relied on Gtk.StatusIcon, which is a no-op on GNOME and on Wayland generally, so `--tray` / `--start-hidden` produced a hidden window and an invisible icon (the app looked dead). Prefer a StatusNotifierItem via libappindicator (AyatanaAppIndicator3, falling back to AppIndicator3), which GNOME shows through the AppIndicator extension; keep Gtk.StatusIcon as a fallback for desktops where it still works. The tray menu is shared between both paths. Packaging: add libappindicator-gtk3 (RPM) / gir1.2-ayatanaappindicator3-0.1|gir1.2-appindicator3-0.1 (deb) as a dependency, and recommend gnome-shell-extension-appindicator on GNOME. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
"TellyKeys Tray" (
tellykeys --start-hidden) appeared to do nothing on GNOME. The tray was built withGtk.StatusIcon, which is a no-op on GNOME and on Wayland in general. The result: a hidden window plus an invisible icon, so the app looked dead with no way to bring it back.Fix
setup_tray()now prefers a StatusNotifierItem via libappindicator (AyatanaAppIndicator3, falling back toAppIndicator3), which GNOME renders through the AppIndicator extension.Gtk.StatusIconis kept as a fallback for desktops where it still works._build_tray_menu()and shared by both paths; the "Show TellyKeys" item is wired up as the indicator's secondary-activate target so a middle-click toggles the window where supported.libappindicator-gtk3(RPM) andgir1.2-ayatanaappindicator3-0.1 | gir1.2-appindicator3-0.1(deb) — andRecommendsthegnome-shell-extension-appindicatorso GNOME users actually see the icon.Verification
Ran the patched build with
--start-hiddenon Fedora 44 / GNOME 50 (Wayland) and confirmed the item registers with the StatusNotifierWatcher:i.e. the tray icon is live and shown by the AppIndicator extension. No crash;
Gtk.StatusIconfallback path is unchanged for other desktops.🤖 Generated with Claude Code