Skip to content

feat(desktop): add Hyprland support - #117

Merged
mmaher88 merged 5 commits into
mmaher88:masterfrom
eklonofficial:hyprland-support
Jul 28, 2026
Merged

feat(desktop): add Hyprland support#117
mmaher88 merged 5 commits into
mmaher88:masterfrom
eklonofficial:hyprland-support

Conversation

@eklonofficial

Copy link
Copy Markdown
Contributor

Previously Hyprland fell back to GenericDesktop which meant no active-window tracking and not per-app profile switching, this should fix that. It detects hyprland via XDG_CURRENT_DESKTOP or HYPRLAND_INSTANCE_SIGNATURE, connects to hyprland's event socket, and listens for activewindow events, then routes them through the existing desktop-file resolution and the activeWindowChanged signal so the rest of the logic is untouched. For now, there's only 3 preset: close window, switch desktop left, and switch desktop right, and they only appear when a matching live Hyrpland keybind exists.

@mmaher88

mmaher88 commented May 3, 2026

Copy link
Copy Markdown
Owner

@eklonofficial will definitely review this but might take some time for me to find a chance to test it.
Please bear with me a little bit 🙏

@eklonofficial

Copy link
Copy Markdown
Contributor Author

No problem, take your time!

@mmaher88 mmaher88 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Validated locally: clean rebase onto master, full suite green (747 C++ / 72 QML). The event-socket approach is the cleanest of the three DE integrations — push-based via QLocalSocket with auto-reconnect, no polling or subprocess (KDE still falls back to a 500ms D-Bus poll). IDesktopIntegration change is a doc comment only, so KDE/GNOME paths are untouched. Tests are substantive (real QLocalServer simulating the compositor socket, focus de-duplication, modifier decoding, invalid-JSON handling) and the wiki docs match the implementation with no drift. Graceful degradation when HYPRLAND_INSTANCE_SIGNATURE/socket are absent is handled. Thanks — nice contribution.

Follow-up on my side: the README DE-support table still lists only KDE/GNOME/Other, so Hyprland currently falls under "Other DEs" which shows per-app profiles as unsupported. I'll open a separate PR to add the column.

@mmaher88
mmaher88 merged commit 4c3a82a into mmaher88:master Jul 28, 2026
6 checks passed
mmaher88 added a commit that referenced this pull request Jul 28, 2026
Hyprland support landed in #117 but the README table still listed only
KDE/GNOME/Other, so Hyprland fell under "Other DEs" — which shows per-app
profiles and auto-switching as unsupported, understating what it does.

Focus tracking is implemented over the compositor event socket, so per-app
profiles and auto profile switching are supported. blockGlobalShortcuts is a
documented no-op (Hyprland has no stable compositor-wide shortcut-block API),
so that row is marked unsupported and the note explains the consequence.
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