Skip to content

bar: fix special workspace indicator stuck on "special" - #3646

Open
MutipleAn wants to merge 1 commit into
end-4:mainfrom
MutipleAn:fix/stuck-special-workspace-indicator
Open

MutipleAn wants to merge 1 commit into
end-4:mainfrom
MutipleAn:fix/stuck-special-workspace-indicator

Conversation

@MutipleAn

Copy link
Copy Markdown

Describe your changes

Fixes the special workspace indicator being stuck visible on the bar (showing special forever) when monitor data is unavailable.

After a resume from suspend (or a monitor reconnect), the workspaces widget's monitor binding can evaluate while Hyprland.monitorFor() returns null, and it never re-evaluates afterwards because a function call creates no binding dependency. WorkspaceModel then failed to find the monitor data (TypeError: Cannot read property 'id' of null) and specialWorkspaceName fell back to "special", so specialWorkspaceActive stayed true permanently.

Changes:

  • WorkspaceModel: null-safe monitor lookup, and default specialWorkspaceName to "" instead of "special" so missing data can no longer fake an active special workspace
  • Workspaces: make the monitor binding depend on Hyprland.monitors.values so it re-evaluates when Hyprland (re)populates monitors

Verified by toggling the scratchpad: no pill when hidden, pill appears when shown, disappears when hidden again.

Is it ready? Questions/feedback needed?

Ready.

The special workspace pill could stay visible forever when the monitor
data was unavailable (e.g. the bar was created before Hyprland announced
the monitor, such as right after login or resume). WorkspaceModel fell
back to a name of "special", so the pill was permanently marked active.

- WorkspaceModel: guard against a null monitor and default the name to
  an empty string instead of "special"
- Workspaces: let the monitor binding re-evaluate when the monitor list
  changes, since Hyprland.monitorFor() creates no property dependency
satori-5423 pushed a commit to satori-5423/dots-hyprland that referenced this pull request Sep 16, 2026
The special workspace pill could stay visible forever when the monitor
data was unavailable (e.g. the bar was created before Hyprland announced
the monitor, such as right after login or resume). WorkspaceModel fell
back to a name of "special", so the pill was permanently marked active.

- WorkspaceModel: guard against a null monitor and default the name to
  an empty string instead of "special"
- Workspaces: let the monitor binding re-evaluate when the monitor list
  changes, since Hyprland.monitorFor() creates no property dependency

(cherry picked from commit daa3bd4)
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