omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Regression: Quickshell workspace indicator shows globally focused workspace on every monitor

Open NeroSong opened this issue 3 months ago • 7 comments

System details

AMD Ryzen 5 7640HS with Radeon 760M (Phoenix1), Omarchy 4.0.0-1, Hyprland, two displays (eDP-1 + DP-1)

What's wrong?

Description

On a multi-monitor setup, the built-in Quickshell omarchy.workspaces widget highlights the globally focused Hyprland workspace on every monitor's bar instead of the active workspace of that specific monitor.

The actual Hyprland workspace assignment works correctly: switching the laptop display does not change the content on the external display. Only the indicator on the external display changes, so it no longer represents what that monitor is showing.

This appears to be a regression of #1533 after the migration from Waybar to the Quickshell-based Omarchy Shell. Issue #1533 was closed as completed, but the same behavior is present in the current widget.

Steps to reproduce

  1. Connect an external monitor and keep the Omarchy bar visible on both displays.
  2. Put workspace 5 on the external display.
  3. Focus the laptop display and switch it to workspace 3.
  4. Observe the workspace indicator on the external display.

Actual behavior

Both bars highlight workspace 3, even though the external display still shows workspace 5.

Expected behavior

  • The laptop display bar should highlight workspace 3.
  • The external display bar should continue highlighting workspace 5.
  • Each bar should derive its active workspace from the monitor associated with that bar.

Verified Hyprland state

While reproducing the issue, hyprctl monitors reported:

  • eDP-1: active workspace 3
  • DP-1: active workspace 5

The visible content matched that state.

Suspected cause

The packaged shell/plugins/bar/widgets/Workspaces.qml determines the focused state using the global workspace:

readonly property bool focused:
    Hyprland.focusedWorkspace !== null &&
    Hyprland.focusedWorkspace.id === modelData

Every bar instance therefore reads the same Hyprland.focusedWorkspace, regardless of which screen owns that bar.

Diagnostics

The installed Omarchy version is 4.0.0-1. This release does not expose the documented omarchy debug --no-sudo --print command; it returns Unknown Omarchy command, so no debug output is attached.

NeroSong avatar Aug 25 '26 08:08 NeroSong

Hit this on 4.0.1 with two external displays. Your read of line 59 is right, and there's a second half to it: workspaceIds() in the same file is monitor-blind too..

It starts from a hardcoded [1, 2, 3, 4, 5] and then adds anything in Hyprland.workspaces.values without even looking at .monitor, so even once the highlight is fixed, every bar still lists workspaces that live on a different display.

I had to clone and adjust the workspace plugin in order to make it more like i3, only showing the numbers per screen, to make it simpler and a bit more intuitive without having a lot of double-takes when it was shared across multiple screens. 😸

ZynthCode avatar Aug 30 '26 16:08 ZynthCode

@ZynthCode Exactly! I also found that cloning the plugin and fixing it myself was the only way to go.

But now I’m actually starting to love this simple, brute-force design — it lets me switch between the two screens without even moving the cursor 🤣

NeroSong avatar Aug 30 '26 19:08 NeroSong

Update: I ended up cloning and tweaking the workspace plugin. The default behavior when connecting an external monitor is to grab the next available workspace—with no way to adjust it—which I found intolerable 😅

NeroSong avatar Aug 31 '26 11:08 NeroSong

Fix for this is in https://github.com/omacom/omarchy/pull/8997 — highlight each bar's own monitor activeWorkspace instead of the global Hyprland.focusedWorkspace.

Still reproduces on 4.0.2-1. Until that lands, omarchy plugin clone omarchy.workspaces and apply the same focused binding from the PR.

mikebenner avatar Aug 31 '26 17:08 mikebenner

Additional user-visible symptom on a VNC + physical-monitor setup (Omarchy 4.0.4-1, Hyprland 0.56.2-2, Quickshell 0.3.1-1):

  • The user reports that clicking workspace 2 in the bar on the VNC display appears to show the same content as workspace 3, and the indicator usually jumps back to the previous workspace immediately.
  • Read-only hyprctl -j monitors / hyprctl -j workspaces checks on 2026-09-29 showed VNC-1 focused on workspace 3 (one window), while HDMI-A-1 was already displaying workspace 2 (four windows). The outputs are separate (mirrorOf: none), so workspace 2 is present and has not become a clone of 3.
  • The installed Workspaces.qml unconditionally lists IDs 1–5 on every bar (workspaceIds(), line 21). A click calls the global hl.dsp.focus({ workspace = "2" }) (lines 33–35), while the marker reads the global Hyprland.focusedWorkspace (line 59). In this state, focusing 2 targets the HDMI output; the VNC image stays on 3. Subsequent input on VNC can focus that output again, likely explaining the apparent snap-back.

This is a source/state-based explanation of the user's click report; I did not automate a click or move their live workspaces during diagnosis. #11976 should fix the misleading marker, but explicitly leaves click-to-focus unchanged. For a single-output VNC viewer, that still makes the 2 button appear to do nothing. Could the bar distinguish workspaces shown on another output, or make the intended cross-monitor click behavior clearer?

The documented omarchy debug --no-sudo --print command is unavailable in this installation (Unknown Omarchy command), so the focused diagnostics above are supplied instead.

christophvarga avatar Sep 29 '26 13:09 christophvarga

Confirmed in source on current quattro (c352b62): shell/plugins/bar/widgets/Workspaces.qml:59 compares every button against the single global Hyprland.focusedWorkspace, and the shell draws one bar per screen (shell/plugins/bar/Bar.qml:1210), so every bar marks whichever workspace has focus, whatever its own monitor is showing.

The fix is already open as #11976, which says Fixes #8183, so this issue closes when it merges. It changes only the focused binding: each bar looks up its own monitor through its window's screen and marks that monitor's activeWorkspace, using the same screen lookup as shell/Ui/PopupCard.qml:26. That pull request is reviewed on its own, and the review there decides whether it is ready.

The two points from the comments are left as they are by #11976, and I read them as current design rather than defects. Each bar lists 1–5 plus any workspace that exists, from every monitor (Workspaces.qml:20). Clicking a number focuses that workspace wherever it lives (Workspaces.qml:33), which is what the manual says the button does (manual/05-the-top-bar.md:20). On a single-output VNC view, focusing a workspace on the other output looks like nothing happened. Whether bars should list only their own monitor's workspaces, or mark ones that live elsewhere, is a design question for the maintainer, separate from this fix.

Diagnosed by Claude Opus 5.5 from source, with nothing run. Codex Medium reviewed the same code independently, agreed on the mechanism and that #11976 fixes the reported symptom, and supplied the manual and screen-lookup references. Its independence is not guaranteed. This now waits on the maintainer's decision on #11976.

omarchybot avatar Oct 09 '26 01:10 omarchybot

Update: I’ve switched back to the official workspace manager and omarchy.workspaces widget on current Edge, and removed my custom workspace implementation.

Independent per-monitor switching works correctly, and reconnecting the external monitor restores its workspaces. The original indicator issue is resolved on my setup following #15655 and #15867.

Environment: Omarchy 4.0.0.r7438.g717175d-1, Hyprland 0.57.0. I currently retain a small local adapter for the legacy set_workspace call in the manager; that compatibility issue is separate from this report.

Thanks for implementing this — closing as resolved for my setup.

NeroSong avatar Oct 30 '26 14:10 NeroSong