Skip to content

Add tray icon and close/minimize-to-tray options#2075

Closed
blockedby wants to merge 1 commit into
nukeop:masterfrom
blockedby:wayland-tray-options-upstream
Closed

Add tray icon and close/minimize-to-tray options#2075
blockedby wants to merge 1 commit into
nukeop:masterfrom
blockedby:wayland-tray-options-upstream

Conversation

@blockedby
Copy link
Copy Markdown

Summary

Implements desktop tray support and tray window behavior requested in discussion #2004.

  • enables Tauri's tray-icon feature and registers a Nuclear tray icon/menu
  • uses the app default icon and enables the GTK app id for Linux app identity
  • adds tray actions to show/focus the main window and quit the app
  • adds opt-in Preferences > General toggles for close-to-tray and minimize-to-tray
  • wires close/minimize behavior through the Tauri window API while preserving default behavior when both settings are disabled

Wayland / Linux tray notes

Tauri v2's tray support is backed by the tray-icon crate on Linux. The Linux implementation uses libappindicator/libayatana-appindicator, so it targets StatusNotifierItem/AppIndicator-capable tray hosts rather than the legacy X11-only system tray path. This should work on Wayland compositors when the desktop/bar provides an SNI/AppIndicator tray host, such as KDE Plasma or Hyprland with a compatible tray applet/bar.

Verification

Run locally on this branch:

  • pnpm --filter @nuclearplayer/player lint
  • pnpm --filter @nuclearplayer/player type-check
  • pnpm --filter @nuclearplayer/player build:frontend
  • pnpm --filter @nuclearplayer/player test ✅ — 61 files, 569 passed, 1 todo
  • cd packages/player/src-tauri && cargo check
  • cd packages/player/src-tauri && cargo test ✅ — 24 passed

Rust checks emitted existing MPD dead-code warnings unrelated to this change.

Manual Wayland verification still needed

I could not run a live GUI Wayland tray-host smoke test in this environment. Suggested manual checks:

  1. Run this branch in a Wayland session with an SNI/AppIndicator tray host (for example KDE Plasma, or Hyprland with Waybar/swaybar tray support).
  2. Confirm the Nuclear tray icon appears.
  3. Left-click the tray icon and confirm the main window is shown/focused.
  4. Open the tray menu and confirm Show Nuclear restores/focuses the window and Quit exits the app.
  5. Enable Close to tray in Preferences > General, close the main window, and confirm it hides instead of quitting.
  6. Enable Minimize to tray, minimize the main window, and confirm it hides to tray and can be restored from the tray icon/menu.
  7. Disable each option and confirm normal close/minimize behavior is restored.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Thanks for your interest in translating Nuclear!

We use Crowdin to manage translations. Please contribute translations there instead:
https://crowdin.com/project/nuclear

If you're new to Crowdin, check out the getting started guide for translators.

@github-actions github-actions Bot closed this Jun 2, 2026
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.

1 participant