From 2cecbd5d0e73a2192d0b83e9fa63233086f5b8d4 Mon Sep 17 00:00:00 2001 From: Ramfi Aogusto Date: Mon, 10 Aug 2026 23:05:19 -0400 Subject: [PATCH] feat(linux): add --no-tray-icon to hide the tray while keeping the GUI --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. --- linux-rust/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux-rust/src/main.rs b/linux-rust/src/main.rs index f43f575b2..9b2a0ddc1 100644 --- a/linux-rust/src/main.rs +++ b/linux-rust/src/main.rs @@ -36,6 +36,13 @@ struct Args { help = "Disable system tray, useful if your environment doesn't support AppIndicator or StatusNotifier" )] no_tray: bool, + #[arg( + long, + help = "Hide the tray icon but keep the GUI running, so the window can \ + still be opened. Unlike --no-tray, which disables the GUI \ + entirely and leaves nothing able to open a window." + )] + no_tray_icon: bool, #[arg(long, help = "Start the application minimized to tray")] start_minimized: bool, #[arg( @@ -126,7 +133,7 @@ async fn async_main( } } - let tray_handle = if args.no_tray { + let tray_handle = if args.no_tray || args.no_tray_icon { None } else { let tray = MyTray {