exlab_wizard.tray.autostart#
Per-platform autostart registration. Backend Spec §4.3.2 + §15.7.
Registers ExLab-Wizard-Tray to launch at user login. Reversible from
Settings -> Application (Frontend §7).
Per-platform mechanism:
macOS –
LaunchAgentplist at~/Library/LaunchAgents/com.exlab-wizard.tray.plistwithRunAtLoad: true.Windows –
HKCU\Software\Microsoft\Windows\CurrentVersion\Runregistry entry. Per-user only (noHKLMwrites).Linux –
~/.config/systemd/user/exlab-wizard-tray.serviceplus the XDG~/.config/autostart/exlab-wizard-tray.desktopfallback for non-systemd setups (§15.7.1).
Tests inject a filesystem_root (or set the
EXLAB_AUTOSTART_ROOT env var) so the manager writes to tmp_path
instead of a real per-user location. Real per-OS registration is left
to the launcher in production.
Classes
|
Per-platform autostart register / unregister / is_registered. |
- class exlab_wizard.tray.autostart.AutostartManager(*, executable_path=None, filesystem_root=None, platform=None)[source]#
Bases:
objectPer-platform autostart register / unregister / is_registered.
Construction-time parameters:
executable_path– absolute path toExLab-Wizard-Tray. The production launcher resolvessys.executable(PyInstaller bundles setsys.executableto the launcher binary).filesystem_root– root directory for per-user files. Defaults toPath.home()in production; tests injecttmp_path. The env-var overrideEXLAB_AUTOSTART_ROOTwins over the constructor default.platform– override the OS dispatch, used by tests to exercise every branch on a single host.
- Parameters:
- property platform: Platform#
Return the platform dispatch this manager is configured for.