Skip to content

Add Linux system tray support via AppIndicator3#1300

Open
abn wants to merge 2 commits intolemonade-sdk:mainfrom
abn:support-linux-tray
Open

Add Linux system tray support via AppIndicator3#1300
abn wants to merge 2 commits intolemonade-sdk:mainfrom
abn:support-linux-tray

Conversation

@abn
Copy link
Contributor

@abn abn commented Mar 4, 2026

lemonade-tray now builds on Linux when GTK3 + AppIndicator3 are present
(auto-detected at CMake configure time; use ENABLE_LINUX_TRAY=ON to require
them). The GTK-free ayatana-appindicator-glib variant is preferred. The tray
connects to an already-running server, or starts one via systemd if a unit is
installed, otherwise spawns lemonade-router directly. lemonade-server on Linux
remains always headless. setup.sh gains optional tray dependency detection.

@abn abn force-pushed the support-linux-tray branch from e5d6132 to 7a97874 Compare March 4, 2026 23:54
@abn abn force-pushed the support-linux-tray branch from 7a97874 to 4aec12e Compare March 6, 2026 00:37
@abn abn requested a review from superm1 March 6, 2026 00:40
@abn abn marked this pull request as ready for review March 6, 2026 00:43
@abn abn force-pushed the support-linux-tray branch from 4aec12e to 509c998 Compare March 7, 2026 00:46
@abn abn changed the title Add Linux system tray support via GTK3 + AppIndicator3 Add Linux system tray support via AppIndicator3 Mar 7, 2026
abn and others added 2 commits March 8, 2026 00:47
lemonade-tray now builds on Linux when GTK3 + AppIndicator3 are present
(auto-detected at CMake configure time; use ENABLE_LINUX_TRAY=ON to require
them). The GTK-free ayatana-appindicator-glib variant is preferred. The tray
connects to an already-running server, or starts one via systemd if a unit is
installed, otherwise spawns lemonade-router directly. lemonade-server on Linux
remains always headless. setup.sh gains optional tray dependency detection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ayatana-appindicator-glib exports menus as org.gtk.Menus, but GNOME
Shell's AppIndicator extension only speaks com.canonical.dbusmenu.
Register an empty GMenu and DbusmenuServer before setting the indicator
active to avoid a race on discovery, then populate both on set_menu().
Also fix submenu rendering: use g_menu_item_new_submenu() to avoid the
dbusmenu serialiser discarding the submenu link, and skip appending
empty sections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@abn abn force-pushed the support-linux-tray branch from 509c998 to c357ea3 Compare March 7, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants