Repository navigation
[ryoku] wm: read Hyprland state over the request socket - #548
Merged
neur0map merged 4 commits intoOct 25, 2026
Merged
Conversation
Every watch refresh forked hyprctl for monitors, workspaces, clients and devices, so a workspace switch launched three processes per provider. Reads now go through one query choke point that speaks the -j request on the compositor's request socket; commands that change state stay on hyprctl. The geometry poll shares the same path. Note: Fixed: Switching workspaces or retitling windows on Hyprland no longer launches helper processes for every update
Ryogami asked its provider for the window list even when no playback rule looks at it, so every title change and floating window cost a second refresh beside the shell's. The stream now carries windows only while a fullscreen, maximised or full-width rule is on, and restarts with the new kinds when those settings change. Note: Fixed: The wallpaper daemon no longer tracks every window when no window-based pause rule is enabled
A full-width pause rule needs the window list only where the compositor fills columns, which Ryogami learns from the caps probe. If that probe failed when the stream started, the rule went blind until a setting changed. Unknown caps now keep the list in the stream. Note: Fixed: The full-width wallpaper pause works when the compositor answers late at login
Member
|
Thanks for the work here, this ships in the next v1 release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The Hyprland provider read compositor state by forking
hyprctl, and two providers ran side by side. A workspace switch cost six process launches. Reads now use the request socket, and Ryogami subscribes to windows only when a pause rule reads them.query(wm/hyprland/query.go) sendsj/<args>to.socket.sock. The watch reads and theactreads use it. Commands that change state stay onhyprctl.readWindowsDirect/controlQuery.windowsonly while a fullscreen, maximized or full-width pause rule is on, or while the caps probe has not answered yet. Aplayback.*setting change restarts the stream with the new kinds.Fixes itsKontra#220
Estimated improvement
About 6
hyprctllaunches per workspace switch, and ~900 launches/min under title churn, drop to near zero. With one fewer provider following windows, its CPU (2 × 0.33%) and wakeups (2 × ~360/s) should roughly halve or better. The before figures come from the issue; the after is an estimate, not measured.Area
ryoku
How it was tested
go build,go vetandgo testpass inryoku/wmandryoku/shell/ryogami/daemon, andgofmtis clean.summon,window.placeand touchpad still work; toggling the Ryogami pause rules works; the process-launch count per switch is near zero.Follow-up: geometry is still polled at 4 Hz while a floating window is visible, now over the socket. Making it on-demand needs a contract change.
Checklist
[area] scope: summarycommit subject.CHANGELOG.mdupdated in the area I touched.--no-verify.luac -p), shell scripts passbash -n, and QML passesqmllintwhere applicable.