Skip to content

Add Niri workspace stack and focus tracking#3218

Open
JohnnyP0T wants to merge 1 commit into
noctalia-dev:mainfrom
JohnnyP0T:codex-niri-workspace-stack-pr
Open

Add Niri workspace stack and focus tracking#3218
JohnnyP0T wants to merge 1 commit into
noctalia-dev:mainfrom
JohnnyP0T:codex-niri-workspace-stack-pr

Conversation

@JohnnyP0T

Copy link
Copy Markdown
Contributor

Summary

This PR improves the Niri workspace widget by introducing a compact vertical workspace stack, surfacing active-workspace window chips, and preferring Niri metadata focus when resolving the focused compositor window.

Included changes

  • add niri_stack workspace rendering with compact vertical indicators
  • center the visible workspace slice around the active workspace
  • avoid empty leading and trailing slots in the compact view
  • show active-workspace window chips next to the stack
  • track focused compositor window via NiriWorkspaceBackend
  • prefer Niri metadata focus over potentially stale ext-workspace focus in CompositorPlatform
  • expose new widget settings for the Niri workspace stack mode

Validation

  • ran clang-format on the touched files
  • built successfully with ninja -C build-debug

Known issues / Open questions

  • Active window highlighting is still slightly delayed compared to Niri's visible focus changes. The metadata backend already receives WindowFocusChanged, but there still appears to be additional latency somewhere in the update/render pipeline.
  • Clicking the upper workspace indicator can still activate the wrong workspace in some situations. The visual ordering comes from Niri metadata, while activation currently follows a different path.
  • Compact workspace labels are intentionally omitted for now. I'm considering a hover-reveal approach and would appreciate UX feedback.

@JohnnyP0T

Copy link
Copy Markdown
Contributor Author

Screenshots

Current implementation on Niri:

image

Features shown:

  • Compact vertical workspace indicators.
  • Active workspace window chips displayed next to the stack.
  • Optimized for Niri's vertical workspace workflow.

Current limitations

  • Active window highlighting is still slightly delayed compared to Niri's visible focus changes.
  • Workspace activation from the compact indicators still needs investigation.

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