Deferred from the 2026-07-07 overnight niri-computer-use rebuild — revisit after living with the current setup for a few days.
Problem
The named "agent" workspace (background staging area for acu spawn --bg) is pushed to the bottom of the workspace list at session start (move-workspace-to-index 9 --reference agent in config.kdl). But niri's dynamic workspaces materialize from the trailing empty slot below it, so the agent workspace can drift up one position mid-session. Cosmetic only: Mod+0 targets it by name and stillsuit shows it as a mauve dot, so the index no longer matters for muscle memory.
Proposed fix (if the drift ends up annoying)
A ~40-line watcher (bin/agent-workspace-pin + systemd user unit, PartOf=graphical-session.target, Restart=on-failure):
- Subscribe to
niri msg -j event-stream; react only to WorkspacesChanged.
- Invariant: agent workspace sits second-to-last on its output (right above niri's permanent trailing empty workspace).
- On drift:
niri msg action move-workspace-to-index 9 --reference agent. Converges in one step (the corrective move's own event passes the check); idempotent if races occur.
- Intent heuristic so it never fights a human: keep the previous snapshot — re-pin only when the workspace count changed (drift case); if only the agent's index changed at constant count, that was a manual drag, leave it alone until next session.
Reliability notes: the event stream is the same feed stillsuit's bar consumes all day; niri dumps full state on every stream connect, so restart/reconnect can't miss drift.
Context
Built in Claude Code session 6522abba-e061-4616-8a64-131afea9f27c (transcript lands in ~/.local/share/tracer/archive/claude/dotfiles/6522abba-e061-4616-8a64-131afea9f27c.md once archived). Full environment findings: agents/skills/niri-computer-use/references/environment.md. Relevant commits: 994b0ee..596f508.
🤖 Generated with Claude Code
Deferred from the 2026-07-07 overnight niri-computer-use rebuild — revisit after living with the current setup for a few days.
Problem
The named
"agent"workspace (background staging area foracu spawn --bg) is pushed to the bottom of the workspace list at session start (move-workspace-to-index 9 --reference agentin config.kdl). But niri's dynamic workspaces materialize from the trailing empty slot below it, so the agent workspace can drift up one position mid-session. Cosmetic only:Mod+0targets it by name and stillsuit shows it as a mauve dot, so the index no longer matters for muscle memory.Proposed fix (if the drift ends up annoying)
A ~40-line watcher (
bin/agent-workspace-pin+ systemd user unit,PartOf=graphical-session.target,Restart=on-failure):niri msg -j event-stream; react only toWorkspacesChanged.niri msg action move-workspace-to-index 9 --reference agent. Converges in one step (the corrective move's own event passes the check); idempotent if races occur.Reliability notes: the event stream is the same feed stillsuit's bar consumes all day; niri dumps full state on every stream connect, so restart/reconnect can't miss drift.
Context
Built in Claude Code session
6522abba-e061-4616-8a64-131afea9f27c(transcript lands in~/.local/share/tracer/archive/claude/dotfiles/6522abba-e061-4616-8a64-131afea9f27c.mdonce archived). Full environment findings:agents/skills/niri-computer-use/references/environment.md. Relevant commits: 994b0ee..596f508.🤖 Generated with Claude Code