Skip to content

feat(rog-control-center): add XDG global shortcut support#167

Merged
Ghoul4500 merged 3 commits into
OpenGamingCollective:mainfrom
voidvore:feat/rog-control-center-global-shortcut
Jul 23, 2026
Merged

feat(rog-control-center): add XDG global shortcut support#167
Ghoul4500 merged 3 commits into
OpenGamingCollective:mainfrom
voidvore:feat/rog-control-center-global-shortcut

Conversation

@voidvore

@voidvore voidvore commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The XDG host portal associates an unsandboxed application with an application
ID. That ID must match an installed desktop file basename:

https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.host.portal.Registry.html

ROG Control Center previously installed rog-control-center.desktop.
This PR standardizes the application identity on
org.opengamingcollective.rog-control-center.desktop and adds XDG global
shortcut support for the Armoury/ROG key.

Current changes

  • Rename the installed desktop entry to match the canonical application ID.
  • Use the same ID for Slint window metadata, AppStream, and autostart.
  • Update Make and RPM packaging while keeping the executable and D-Bus API names unchanged.
  • Route window show, hide, and quit actions through a shared window controller.
  • Add an ashpd-based XDG GlobalShortcuts session for XF86Launch3.
  • Add App Settings controls for enabling, assigning, configuring, and monitoring the shortcut.
  • Persist the setting, restore it silently at startup, and close the portal session cleanly on exit.
  • Disable the feature on ROG Ally.

Implementation status

  • Add a window command path that is safe to call from the portal worker.
  • Add an ashpd-based XDG GlobalShortcuts portal session manager.
  • Add user-facing shortcut settings and status.
  • Handle missing portal support and portal session closure.
  • Add config compatibility, assignment, and keep-alive unit tests.
  • Document portal ordering and KDE empty-trigger behavior.

Reference Links

Screencast_20260715_141747.mp4

voidvore added 2 commits July 18, 2026 22:52
Rename the installed launcher and align the Slint, AppStream, and autostart IDs with org.opengamingcollective.rog-control-center. Update Make and RPM packaging while leaving the executable and D-Bus API names unchanged.

This changes the desktop file ID. Package upgrades clean up the old path; manual installations may need to remove a lingering rog-control-center.desktop file.
…troller

Centralize window control behind a single clonable entry point so
the tray (and upcoming global shortcuts) can drive the window
directly instead of round-tripping through D-Bus state polling.

Funnel the tray, QuitApp, and auto-quit exits through
slint::quit_event_loop(): previously each of them called exit(0),
so run_event_loop_until_quit() never returned and the cleanup
after it (tokio shutdown, destructors) was dead code. unwrap()s
on slint calls became logged errors: with panic = "abort" in the
release profile, any of them would kill the whole process.
@voidvore
voidvore force-pushed the feat/rog-control-center-global-shortcut branch from 657449f to 13af999 Compare July 18, 2026 20:31
Use ashpd's XDG portal to let the Armoury/ROG key show or hide the app. Add App Settings controls, save the choice, and restore it silently on startup. Reuse the existing Tokio runtime and D-Bus connection, close the shortcut session cleanly on exit, and disable it on ROG Ally.
@voidvore

Copy link
Copy Markdown
Contributor Author
image

@voidvore
voidvore marked this pull request as ready for review July 18, 2026 22:38

@Ghoul4500 Ghoul4500 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution

@Ghoul4500
Ghoul4500 merged commit fad3102 into OpenGamingCollective:main Jul 23, 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.

2 participants