Repository navigation
feat(viewer): place the viewer window on Hyprland with a hyprlang config - #415
Merged
Merged
Conversation
Detect the hyprlang config provider through hyprctl status, or through the version on Hyprland 0.53 and 0.54, which lack the status request. Install the named launch rule through hyprctl keyword, disabled first and enabled last, and disable it again when a keyword is refused. Expand and collapse use the resizewindowpixel and movewindowpixel dispatchers on the verified address. Closes #228
6 tasks done
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.
The viewer's Hyprland placement applied only when
hyprctl -j statusreported the Lua config provider. Hyprland with a hyprlang config got an ordinary window.The adapter now also detects hyprlang:
statusreports it from Hyprland 0.55, and 0.53 and 0.54, which have nostatusrequest, are detected throughhyprctl -j version. On hyprlang it installs the same named launch rule throughhyprctl keyword 'windowrule[<name>]:<field>' <value>(float, pin, no initial focus, monitor, size, move, and the opacity rule). The rule is disabled first and enabled last, so a window that maps in between never meets a partial rule. If Hyprland refuses a keyword, the rule is disabled again. Expand and collapse useresizewindowpixelandmovewindowpixelon the verified client address. The launch record storesprovider: "hyprlang"; records without it keep the Lua path. Hyprland before 0.53 still gets an ordinary window.The runtime check ran Hyprland 0.56.2 with a hyprlang config nested in a headless sway inside a bubblewrap sandbox with no access to the live session. Hyprland 0.53 and 0.54 were checked in source only.
Reviewed with sol-loop: 1 round with GPT-6.1 Sol (high). Sol verdict: approved.
Closes #228
statuswithconfigProvider: "hyprlang"; 0.53 and 0.54 version strings withoutstatus; unknown provider; older versionspackages/cli/test/viewer-hyprland.test.ts;~/.pickforge/investigations/228/06-runtime-log.txt02-clients-after-map.json,02-activewindow-after-map.json03-clients-after-disable.json07-failure-keywords.txt,07-clients-after-failed-install.json04-clients-after-expand.json,05-clients-after-collapse.json,.and)$; near-miss classchrome-127x0x0x1__...`#in a value; invalid rule name; invalid addressviewer-hyprland.test.ts--instance~/.pickforge/investigations/228/README.txtdocs/releases/UNRELEASED.mdstill holds the tagged 0.7.1 notes until they are published and resetRelease note for the next version: "Viewer window placement on Hyprland also works with a hyprlang config, on Hyprland 0.53 and later. (#228)"
Checks:
bun run typecheck,bun run lint,cargo build --release -p pickforge-viewer,bun run test:coveragewith the CI environment variables (3381 passed), PickCheck (53 functions, no violations).