feat(niri): full niri IPC transport, keybinds, config, capabilities, tests - #10
Open
TraNzeM wants to merge 6 commits into
Open
feat(niri): full niri IPC transport, keybinds, config, capabilities, tests#10TraNzeM wants to merge 6 commits into
TraNzeM wants to merge 6 commits into
Conversation
…tests
- Fix transport: request as {"Windows":null}, reply {"Ok":{...}}
- requestQuery for nested query unwrapping (Windows/Workspaces/Outputs)
- Subscribe with {"EventStream":null}, top-level events
- ListMonitors: parse map output (not slice)
- BatchKeybinds/BindKey/UnbindKey via ambxst.kdl + include + reload
- SetConfig via ambxst-appearance.kdl + include + reload
- GetConfig from generated appearance file
- GetCapabilities with Shadows=false (niri has no shadows)
- Add System.GetCapabilities handler in server.go
- Add client_test.go (7 tests via fake niri socket)
added 4 commits
August 18, 2026 12:21
niri's Outputs query has no 'focused' flag, so ListMonitors returned
IsFocused=false for every output. That left AxctlService.focusedMonitor
null, which made Visibilities.setActiveModule('') no-op — the overview
could not be closed. Query Workspaces and mark the output hosting the
focused workspace as focused.
- ListWindows: parse layout.window_size into metadata width/height so the QML overview can render real-size previews (niri has no absolute position) - ListMonitors: also track the active workspace per output and expose it via metadata.active_workspace, so the overview can center/highlight correctly - Extend TestListMonitors to assert active_workspace
niri returns Workspaces in arbitrary order; sort by idx (metadata.index) so the Ambxst overview scrolling column matches the real workspace order.
niri does not export NIRI_SOCKET into the environment of spawn-at-startup children, so axctl daemon failed with 'no supported compositor detected' when started automatically. Fall back to globbing XDG_RUNTIME_DIR for niri*.sock. This makes autostart work without manual env setup.
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.
Summary
Complete the niri backend of the
Compositorabstraction. The existing niri adapter returned empty results because the IPC transport didn't match niri's actual protocol.Changes
Transport (
pkg/ipc/niri/client.go){"Windows":null}, reply is{"Ok":{...}}(not wrapped inReply)requestQuery()to unwrap nested query responses ({"Windows":[...]})Subscribe()now sends{"EventStream":null}, parses top-level events, skips{"Ok":"Handled"}ListMonitors()parses the map-typedOutputsresponseFeatures
BatchKeybinds/BindKey/UnbindKey— generateambxst.kdl+ include in config.kdl + reload (niri has no dynamic IPC binds)SetConfig— generateambxst-appearance.kdl+ include + reloadGetConfig— read values back from the generated appearance fileGetCapabilities—Shadows: false(niri renders no shadows); added the missingSystem.GetCapabilitieshandler inserver.goGenerator (
pkg/ipc/niri/generator.go)GenerateKeybindsFromPayloadwith Hyprland→niri dispatcher mappingSafety
ApplyConfigfor niri writes toambxst-generated.kdl+ include — never overwrites the user'sconfig.kdlTests (
pkg/ipc/niri/client_test.go, new)Verification
go build ./...OK,go test ./...OK (niri 7/7)