Skip to content

feat(niri): branch QML layers by compositor, hide unsupported settings - #224

Open
TraNzeM wants to merge 7 commits into
Axenide:mainfrom
TraNzeM:niri-support
Open

feat(niri): branch QML layers by compositor, hide unsupported settings#224
TraNzeM wants to merge 7 commits into
Axenide:mainfrom
TraNzeM:niri-support

Conversation

@TraNzeM

@TraNzeM TraNzeM commented Aug 18, 2026

Copy link
Copy Markdown

Summary

Adapt the Ambxst shell to run on the niri compositor (in addition to the existing Hyprland support). All compositor abstraction already lives in the axctl daemon; these changes branch the QML UI by the detected compositor.

Changes

  • AxctlService.qml: detect the active compositor via NIRI_SOCKET / /run/user/<uid>/niri*.sock; make togglespecialworkspace a no-op on niri (no special workspaces)
  • CompositorConfig.qml: niri path → applyNiriConfig() calls axctl config apply with a universal payload (the KDL generator in axctl writes ambxst-generated.kdl + include + reload)
  • GlobalStates.qml: on niri, set compositorLayout = "scrolling" and mark ready immediately (skip hyprctl which doesn't exist on niri)
  • CompositorPanel.qml: hide the "Shadows" section on niri (niri renders no shadows)
  • BindsPanel.qml: hide the layout selector on niri (single scrollable-tiling layout)
  • cli.sh: add ambxst install niri / ambxst remove niri (adds spawn-at-startup + blur layer-rule to config.kdl)

Verification

- AxctlService: detect compositor via NIRI_SOCKET/socket, no-op for special-workspace
- CompositorConfig: niri path -> applyNiriConfig (axctl config apply)
- GlobalStates: niri layout = scrolling (skip hyprctl), mark ready
- CompositorPanel: hide Shadows section for niri
- BindsPanel: hide layout selector for niri
- cli.sh: add ambxst install niri / remove niri
niri-port added 6 commits August 18, 2026 13:29
- ScrollingOverview: totalWorkspaces now reads from AxctlService.workspaces
  instead of Config.overview.rows*columns (which was wrong on niri)
- Repeater uses the real workspace list; workspaceId/name come from axctl
  instead of index+1 (niri ids are not contiguous)
- ScrollingWorkspace: render the workspace name as a top-left label
niri cannot screencopy a window that sits under the fullscreen overview
overlay (ScreencopyView logs 'non captureable object'). Detect niri via
AxctlService.compositor and disable live preview, showing the icon card
instead of empty window outlines.
niri reports no absolute window position (all at=[0,0]), so windows
stacked on top of each other. Detect this and lay them out in a cascade
by index. Also make the fallback card translucent so the wallpaper shows
through instead of a solid black block.
On niri, the Ambxst overview cannot show live window previews (no absolute
window geometry in IPC). Add AxctlService.toggleOverview() which opens the
compositor's built-in overview (real windows, drag-and-drop) on niri, and
falls back to the Ambxst overview on Hyprland. Wire it into OverviewButton
and the UserInfo profile click.
The dock overview button (DockContent.qml) opened the Ambxst overview
directly via visibilities.overview, bypassing the compositor-aware
toggleOverview(). Route it through toggleOverview() so on niri it opens
the compositor's built-in overview (real windows, drag-and-drop).
CompositorConfig.applyNiriConfig() now includes keybinds collected from
Config.keybindsLoader (binds.json) alongside appearance. Ambxst/system
module binds and custom binds are resolved via KeybindActions and pushed
in the axctl universal payload format, so the niri ConfigGenerator writes
them into ambxst-generated.kdl.

Also re-apply compositor config (debounced) when binds.json changes, so
edits made in the BindsPanel dashboard tab take effect immediately.
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.

1 participant