Skip to content

Add autostart support on settings#141

Open
scardracs wants to merge 5 commits into
OpenGamingCollective:mainfrom
scardracs:feature/autostart
Open

Add autostart support on settings#141
scardracs wants to merge 5 commits into
OpenGamingCollective:mainfrom
scardracs:feature/autostart

Conversation

@scardracs

@scardracs scardracs commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Description

This PR implements the Autostart feature for rog-control-center. It allows users to configure the application to run automatically on system boot, with the option to launch it minimized to the system tray/background.

Core Features:

  • System Autostart Integration: Creates and manages the user's autostart desktop entry file (~/.config/autostart/rog-control-center.desktop) automatically.
  • Autostart Customization (UI Closed / Background Startup): Provides settings to choose whether the application starts minimized to the background on system startup.
  • Autostart Status Sync: Dynamically synchronizes the autostart state on application startup to ensure configuration consistency.
  • UI Controls: Integrates user toggles inside the App Settings page to easily enable/disable system autostart and configure its startup state.

Technical Details

  • rog-control-center/src/config.rs:
    • Added enable_autostart and autostart_in_background to the core configuration struct.
    • Implemented update_autostart to write/remove the rog-control-center.desktop entry in ~/.config/autostart/ with correct launch arguments (--background).
    • Added unit test coverage for the autostart desktop file creation.
  • rog-control-center/src/cli_options.rs: Added the --background argument flag to support starting minimized.
  • rog-control-center/src/main.rs: Added startup initialization to keep the autostart entry in sync and parsed the --background CLI flag to run the application in the background when autostarted.
  • rog-control-center/ui/pages/app_settings.slint: Added the "Start app on system startup" toggle and the nested "Start in background on startup" sub-option.
  • rog-control-center/src/ui/mod.rs: Registered state bindings and callbacks to handle autostart events from the GUI.

End Result

image

@scardracs scardracs changed the title Feature/autostart Add autostart support on settings Jun 28, 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