feat: add system tray with native left-click support on Linux#586
Open
joshii-h wants to merge 2 commits into
Open
feat: add system tray with native left-click support on Linux#586joshii-h wants to merge 2 commits into
joshii-h wants to merge 2 commits into
Conversation
Restores the system tray (added in cinnyapp#166, reverted in cinnyapp#312) and ports it to Tauri v2. The cinnyapp#312 revert was a Flatpak/single-instance build issue; this change adds only the tray and does not reintroduce single instance. Behaviour: - Tray icon with a context menu ("Show/Hide Cinny" and "Quit"). - Close-to-tray: closing the window hides it to the tray instead of quitting the app; it can be reopened from the tray. - Left-clicking the icon toggles the window. Platform handling: - Windows/macOS use Tauri's built-in tray (the tray-icon feature). - On Linux, Tauri's tray-icon backend (libayatana-appindicator) does not forward left-click/Activate events to the application, so the menu is the only interaction. To get proper left-click-to-toggle, the StatusNotifierItem is implemented directly via ksni (the approach Qt apps such as Nextcloud use). The tray-icon feature is therefore limited to non-Linux desktops, which also keeps libappindicator out of the Linux build.
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
ajbura
added a commit
to cinnyapp/cla
that referenced
this pull request
Jun 3, 2026
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.
What
Restores the system tray and ports it to Tauri v2.
A tray was previously added in #166 (closing the request in #65) and reverted in #312. Per the #312 description, the revert was caused by a Flatpak build failing because of the single instance feature that shipped alongside it — "removing system tray until issues with this are fixed" — i.e. the tray itself was not the problem. This PR brings the tray back on its own (without single instance) and rebuilds it for Tauri v2.
Behaviour
Platform handling
tray-iconfeature).tray-iconbackend uses libayatana-appindicator, whose GTK implementation never forwards a left-click / SNIActivateevent to the app; only the context menu works. To provide proper left-click-to-toggle, the StatusNotifierItem is implemented directly withksni— the same native-SNI approach Qt apps (e.g. Nextcloud) use. Thetray-iconfeature is scoped to non-Linux desktop targets, which also keepslibappindicatorout of the Linux build.Notes
// mod menu;(macOS application menu) is left commented out as before; this PR does not touch it.