Skip to content

Start with your PC, in the system's own startup list; Run in background is Close to tray - #367

Merged
elripalda merged 7 commits into
elripalda:mainfrom
Xarishark:feat/launch-on-startup-switch-4b4d55
Nov 20, 2026
Merged

elripalda merged 7 commits into
elripalda:mainfrom
Xarishark:feat/launch-on-startup-switch-4b4d55

Conversation

@Xarishark

@Xarishark Xarishark commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Settings → General → Starting up → Start with your PC (also in Big Picture settings). With it on, the launcher starts when the player signs in and waits in the tray (--background), like Steam, until it's opened from the tray or started again.

The entry goes in each system's own startup list, so the player sees it there and can turn it off there too:

  • Windows: the HKCU\…\Run key (Startup apps, Task Manager). Turned off in Task Manager (the StartupApproved mark) reads as off; turning the switch on clears that mark.
  • Linux: an XDG autostart file, ~/.config/autostart/recomplauncher.desktop, which Plasma's and GNOME's Autostart pages list. It's written only when it changes. It names the theme icon when the launcher is installed, and otherwise a copy of the icon in the data folder (AppImage, a build run from its folder). Hidden=true (Plasma) or X-GNOME-Autostart-enabled=false reads as off.
  • Flatpak: the Background portal (RequestBackground, autostart on/off), which writes the autostart file for the app. No new manifest permission. The sandbox can't read that file, so the choice is kept in settings there.
  • macOS 13+: Login Items via SMAppService.mainAppService. A login item starts with no arguments, so on a Mac the window opens at login. Older macOS doesn't show the switch.

At each start the saved choice follows the system's list (turned off there means off here), and an entry still there is written again so it follows a moved launcher. The switch goes through its own command (set_start_at_login) and shows what the system took; a desktop that says no or doesn't answer leaves it off with a message.

Also: Run in background is renamed Close to tray (same setting and behaviour, all full languages).

New dependencies, both already in or next to the existing tree: zbus 5 (Linux only; already built for the single-instance and notification plugins) and objc2-service-management 0.3 (macOS only, same objc2 family). The new code is mostly in src-tauri/src/autostart.rs, plus small registry helpers in win.rs. All new text is translated in every full language. There's a paragraph in the README; the patch notes line is for Beta 67, collected separately.

How you tested it

  • cargo test: Linux 905 passed, Windows 840 passed (10 new unit tests in autostart.rs, 1 in library.rs).

  • node --test tests/*.test.cjs: 564 passed (new tests/start-at-login.test.cjs; background-settings updated for the rename). tools/launcher-i18n.py --check: no new text missing.

  • KDE Plasma (Bazzite VM), in the launcher: the switch writes and removes the autostart file, Plasma's Autostart page lists it with the launcher's icon, and an entry turned off there turns the switch off at the next start. In a real Plasma session, the generated [email protected] (what Plasma runs at login) started it with no window or taskbar entry, the tray icon registered, and a second start opened the window.

  • Flatpak (built locally from this branch): the portal wrote com.recomplauncher.RecompLauncher.desktop (flatpak run --command=recomplauncher … --background) and removed it again. Plasma lists it with a plain icon, because the portal's file names none. KDE didn't ask; GNOME's dialog is untested.

  • Windows VM: the Run key is written and listed by Win32_StartupCommand, a Task Manager off mark reads as off, turning on clears it, and off removes both values. The hidden start in the Windows desktop is untested.

  • macOS: the Mac code type-checks for aarch64-apple-darwin against the real crate, but it hasn't run on a Mac.

  • npm test passes

  • node --test tests/*.test.cjs passes

  • Tried it in the launcher (Linux debug build and the Flatpak; Windows through the registry calls)

Checklist

  • One change per pull request (plus the Close to tray rename next to it)
  • No version bump or patch notes
  • If it changes what developers can write in recomplauncher.json: not applicable

Patch notes (Beta 67)

For docs/PATCH-NOTES-0.90-beta-67.md, under Everything else:

  • Settings → General can start RecompLauncher with your PC, waiting in the tray until you open it. It shows in your system's own startup list, so you can turn it off there too. — Added by @Xarishark (#367).
  • Run in background is now called Close to tray. It works the same. — Improved by @Xarishark (#367).

For the website (SDK guide): none.

The launcher can start when the player signs in, waiting by the clock (--background) until it's opened. The entry goes where the system lists startup programs, so the player can also see and turn it off there: the Run key on Windows (Startup apps, Task Manager), an XDG autostart file on Linux (Plasma's and GNOME's Autostart pages), the Background portal for the Flatpak, and Login Items (SMAppService) on macOS 13 and newer. At each start the saved choice follows that list, and an entry still there is written again so it follows a moved launcher.
Under Starting up, where the system can do it. The switch goes through its own command and shows what the system took, so a desktop that says no leaves it off with a message. Translated into every full language.
The setting's usual name. Translated into every full language; the saved setting and its behaviour are unchanged.
@Xarishark
Xarishark marked this pull request as draft November 20, 2026 17:45
@elripalda
elripalda marked this pull request as ready for review November 20, 2026 21:56
@elripalda
elripalda merged commit 850bf87 into elripalda:main Nov 20, 2026
6 checks passed
@Xarishark
Xarishark deleted the feat/launch-on-startup-switch-4b4d55 branch November 23, 2026 23:56
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.

2 participants