Repository navigation
Background Service
The background service keeps you on track with hourly desktop notifications while the main window is closed.
BackgroundServiceController (in system_sl/services/background_service.py) uses a QTimer that fires every hour (3,600,000 ms). On each tick it:
- Re-runs the priority engine to refresh task scores.
- Picks the top-priority task.
- Displays it in a HUD-style
SystemNotificationwindow with its sound.
uv run system-sl --bgThe GUI has a checkbox under Settings that toggles autostart on login:
-
Linux: a
.desktopentry in~/.config/autostart/launchingsystem-sl --bg - macOS: a LaunchAgent plist
-
Windows: a Registry
Runkey
Autostart is implemented for all three platforms but is currently tested on Linux.
Autostart only controls whether the notifier is launched at login. It does
not decide whether reminders are shown. The separate Notifications
checkbox under Settings does that, and its value is stored as
notifications_enabled in AppConfig.conf:
- Reminders off: the GUI starts no notifier, and
--bgexits immediately even if an autostart entry still exists. - Reminders on: the GUI runs the notifier while it is open;
--bgdelivers the login reminder. -
BackgroundServiceControllerre-reads the preference on every tick, so a notifier that is already running stops as soon as reminders are switched off.
A user upgrading from a version without notifications_enabled falls back to
their autostart setting, so someone who had autostart off does not suddenly
start receiving reminders.
Only one notifier runs per user. It takes a lock file in the data directory, so
the GUI and a --bg process cannot both deliver the same reminder. A process
without the lock skips its notifications and takes over on its next tick if the
holder exits.
Place .mp3 or .wav files in the sounds/ folder inside the system-sl data directory:
- Linux/macOS:
~/.config/system-sl/sounds/ - Windows:
%APPDATA%\system-sl\sounds\
The GUI lets you preview sounds and set the one used for notifications. Files are validated for duration before use.