dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search Review guide fix(nuguland): track workspace switches in the bar e2dde7392139a06457c6f2459c5c032efd0b1851
Oliver Jan Krylow <oliver@bugabinga.net > · 26 Jun 2026
unsigned
Browse files Compare with HEAD
niri emits WorkspaceActivated {id, focused} on a workspace switch, not a
full WorkspacesChanged — which applyEvent ignored, so the bar never
updated is_focused/is_active. Handle it: set is_active per-output and
is_focused globally for the activated workspace.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changed files (1) quickshell/nuguland/Niri.qml Modified 276 276 if (event.WorkspacesChanged)
277 277 workspaces
= event.WorkspacesChanged.workspaces
|| [];
279 + if (event.WorkspaceActivated) {
280 + const activatedId
= event.WorkspaceActivated.id;
281 + const focused
= !! event.WorkspaceActivated.focused;
282 + let activatedOutput
= null ;
283 + for (
let i
= 0 ; i
< workspaces.length; i
++ )
if (workspaces[i].id
=== activatedId)
284 + activatedOutput
= workspaces[i].output;
286 + workspaces
= workspaces.map((ws)
=> {
287 + const next
= Object .
assign ({
289 + if (ws.output
=== activatedOutput)
290 + next.is_active
= ws.id
=== activatedId;
293 + next.is_focused
= ws.id
=== activatedId;
279 298 if (event.WindowsChanged)
280 299 windows
= event.WindowsChanged.windows
|| [];