feat(linux): add --no-tray-icon to hide the tray while keeping the GUI - #714
Open
RamfiAogusto wants to merge 1 commit into
Open
feat(linux): add --no-tray-icon to hide the tray while keeping the GUI#714RamfiAogusto wants to merge 1 commit into
RamfiAogusto wants to merge 1 commit into
Conversation
--no-tray does more than its name suggests: it runs headless and never starts the iced application at all. Anything that needs the window is then unreachable, since a BluetoothUIMessage::OpenWindow has no consumer and the window silently never opens. That is the right behaviour for a headless run, but it leaves no way to hide only the tray icon. On desktops where a panel indicator already shows the device state, the tray icon is redundant, and today the only way to remove it also removes the window. --no-tray-icon skips the tray registration and leaves the GUI running, so the window can still be opened. --no-tray keeps its current behaviour.
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
--no-traydoes more than its name suggests. It takes the headless path inmain.rsand never starts the iced application:So anything that needs the window becomes unreachable. A
BluetoothUIMessage::OpenWindowis still accepted and sent, but there is no consumer on the other end, and the window silently never opens.That behaviour is correct for a headless run. The gap is that it is the only way to remove the tray icon, so hiding the icon also costs the GUI.
This matters on desktops where a panel indicator already shows battery and listening mode. The tray icon is then redundant, but removing it today means losing the window with it.
Change
--no-tray-iconskips only the tray registration and leaves the GUI running, so the window can still be opened.--no-trayis untouched and keeps its current headless behaviour.Testing
Built and run on Ubuntu 26.04, GNOME Shell 50.1 (Wayland), with AirPods Pro 3.
With
--no-tray-icon --start-minimized:Running in headless modeline in the log — the GUI is uporg.kde.StatusNotifierItem-*name on the session bus — the icon is goneOpenWindowmessage is both received and consumed, and the window opens--no-traywas re-checked and still runs headless as before.