Add tray icon with menu of all notes - #171
Open
bittner wants to merge 2 commits into
Open
Conversation
Adds an implementation of the StatusNotifierItem and com.canonical.dbusmenu D-Bus specifications, since GTK4 has no native tray icon support. The tray menu offers the list of notes (newest first, sharing the application window's sort order, each with a color swatch matching the note's style) and an item that opens the application window with the search entry focused. While a tray host is present, the application holds itself so that closing all windows keeps it running and reachable from the tray; without a tray host, behavior is unchanged. Also grants the Flatpak sandbox permission to talk to the StatusNotifierWatcher, and documents in the README and the Flathub app description that GNOME Shell needs the AppIndicator extension to show the tray icon. Menu items keep stable ids across rebuilds because hosts cache items by id; in-place changes are announced with ItemsPropertiesUpdated, and AboutToShow asks for a refresh since hosts defer layout updates while the menu is closed. Notes whose relative order changed get fresh ids, so that hosts process the reorder as remove and add: the AppIndicator GNOME Shell extension silently drops moves of existing root-level items, because its child-moved handler declares the signal arguments in the wrong order.
Adds a flake that exposes the application built from the working tree (nix run), a dev shell with the meson, ninja, yarn and GJS toolchain including a sticky-run helper that launches the app uninstalled through a GResource overlay (nix develop), and an install-appindicator helper that links the AppIndicator GNOME Shell extension into the user profile so the tray icon can be tested with and without a StatusNotifierWatcher. Also ignores the local meson and Nix build outputs.
This was referenced Jul 2, 2026
Reordering existing dbusmenu items is silently ignored
ubuntu/gnome-shell-extension-appindicator#632
Closed
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.
Adds a tray icon giving quick access to all notes: each menu entry shows a note's title with a color swatch matching its style, in the same order as the All Notes view, plus a Open Sticky Notes 🔍 entry that opens the app with the search entry focused.
While a tray host is present, the app keeps running when all windows are closed so the notes stay reachable from the tray; without one, nothing changes.
Activate via extension
GTK4 has no native tray support, so the icon and menu are provided over D-Bus (StatusNotifierItem and com.canonical.dbusmenu). On GNOME Shell the icon requires the AppIndicator and KStatusNotifierItem Support extension; this is documented in the README and the Flathub description.
Development shell (NixOS)
A separate commit contains a Nix flake for developing and running the app from the working tree.
Screenshot