Skip to content

feat(settings): a switch to hide the tray icon on Windows and Linux - #1934

Merged
KnifeLemon merged 2 commits into
KnifeLemon:mainfrom
YusufMntm:feat/tray-icon-switch-1867
Dec 1, 2026
Merged

KnifeLemon merged 2 commits into
KnifeLemon:mainfrom
YusufMntm:feat/tray-icon-switch-1867

Conversation

@YusufMntm

Copy link
Copy Markdown
Contributor

What does this change?

Windows and Linux get the switch macOS already has: Settings → General → Show Filee in the system tray hides Filee's tray icon while Filee keeps running. Fixes #1867.

  • One setting for all platforms. The switch reuses AppSettings.ShowMenuBarIcon (default on), so there's no new setting, schema step or migration. TrayService now sets IsVisible from it on every platform; the empty macOS tooltip and the template icon stay macOS-only.
  • The label follows the platform. The switch reads general.show_menu_bar_icon on macOS (unchanged) and the new general.show_tray_icon on Windows and Linux. The coloured-icon switch stays macOS-only.
  • How to get back in. When the icon is off on Windows or Linux, a caption under the switch (general.tray_icon_hidden) says Filee keeps running and opens again from the Start menu or the app launcher. That works because a second launch is forwarded to the running instance, which shows the main window (SingleInstance / ListenForLaterLaunches → HandleCommandLine → ShowMain).
  • Close action. With "close keeps Filee in the tray" and the icon hidden, the window still hides as before and comes back the same way. Nothing becomes unreachable, so close behaviour is unchanged.
  • Both new keys are in all 23 i18n/*.json files, after general.colored_menu_bar_icon.
  • CHANGELOG: an Unreleased bullet and a ko/en pair.

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • dotnet format --verify-no-changes (changed .cs files)
  • dotnet test filtered to CloseActionTests, TrayServiceTests, General_page_icon_rows_follow_platform_and_saved_values and LocalizationTests (250 passed, none skipped)
  • Tried it in the app (what you converted or clicked, and on which OS):

Changed tests:

  • TrayServiceTests.Tray_visibility_follows_preference_on_mac_and_other_platforms: on a non-macOS platform the tray icon now follows the preference (it was always visible before).
  • CloseActionTests: on a non-macOS platform the page shows the tray label, toggling saves ShowMenuBarIcon without touching the close action, and the hint shows only while the icon is off.
  • RenderTests.General_page_icon_rows_follow_platform_and_saved_values: the switch is visible on every platform with the right label; the hint appears only on Windows/Linux with the icon off.

I didn't try it in the running app, so I haven't watched the icon leave and come back in the real Windows tray or a Linux StatusNotifier host. The tests check TrayIcon.IsVisible headlessly.

Checklist

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files
  • New third-party code or binaries are listed in THIRD-PARTY-NOTICES.md (none)
  • The PR does one thing (unrelated changes go in a separate PR)

🤖 Generated with Claude Code

Settings → General → "Show Filee in the system tray" reuses the macOS menu bar
preference (ShowMenuBarIcon), so the tray icon follows it on every platform.
When it is off on Windows or Linux, a caption says Filee keeps running and
opens again from the Start menu or the app launcher.

Fixes KnifeLemon#1867

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@KnifeLemon KnifeLemon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @YusufMntm! I read the whole diff. CI is green on every leg, including both macOS ones.

What I checked

  • Reusing ShowMenuBarIcon is safe. Windows and Linux never showed the switch, so the saved value there is the default true. Nobody's icon disappears after the update, and no schema step is needed.
  • Getting back in works as the caption says. A later launch with no files reaches HandleCommandLine with firstLaunch: false, which calls ShowMain().
  • macOS is unchanged. It keeps the same label key, the coloured-icon switch stays macOS-only, and so does the empty tooltip.
  • The two keys are in all 23 files, and the ko text uses 해요체.

One optional suggestion (not blocking). Suppose the icon is hidden and When I close the window is Keep Filee running in the tray. Closing the window then hides Filee, and the only ways to quit are to open it again and change that setting, or to use Task Manager. The default (Ask every time) still offers Quit, so this only affects people who picked the tray. If you like, the hint could end with something like "To quit Filee, set When I close the window to Quit Filee." It's fine to merge without it.

CHANGELOG.md is main's; this PR's lines go in with the maintainers' CHANGELOG catch-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon

Copy link
Copy Markdown
Owner

I merged main into this branch. To stop the open PRs from conflicting on CHANGELOG.md every time one of them merges, the branch now carries main's CHANGELOG. Your lines aren't lost: I saved them and will add them in one CHANGELOG PR after the merges.

@KnifeLemon
KnifeLemon merged commit a2274f0 into KnifeLemon:main Dec 1, 2026
13 checks passed
paulodalves pushed a commit to paulodalves/Filee that referenced this pull request Dec 1, 2026
Lines for KnifeLemon#1381 (macOS updates), KnifeLemon#1698 (portable updates), KnifeLemon#1913, KnifeLemon#1934, KnifeLemon#1915, KnifeLemon#1935, KnifeLemon#1947, KnifeLemon#1864, KnifeLemon#1831, KnifeLemon#1910,
KnifeLemon#1918 and KnifeLemon#1919. The contributors' own lines (left out of their PRs to avoid CHANGELOG conflicts) are used where
they wrote one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add an option to hide the system tray icon

2 participants