e05733448a1449ad3da443bf518a4b847de89c14
Show every workspace grouped by the monitor it is pinned to, in physical
order, and let a click change another monitor without moving the pointer.
- Fixed layout of all 20 workspaces instead of stock's occupancy-derived
list, which seeded [1..5] and hard-capped at 10 — 11-20 could never
appear however they were assigned. Grouped as 11-15 | 1-10 | 16-20,
matching the pinning in ~/.config/hypr/workspaces.lua, with dividers
and wider gaps between groups. Workspace 10 renders as "10" rather than
"0" now that two-digit labels are the norm.
- Clicking a workspace that lives on another monitor switches that
monitor without dragging the cursor across. Omarchy sets
cursor.warp_on_change_workspace = 1, so a plain focus({ workspace })
teleports the pointer to whichever screen the workspace is pinned to.
Instead: suppress warping, hop focus to the target monitor, change its
workspace, hop back, restore warping.
This goes through `hyprctl eval` rather than `dispatch` for two
reasons. Hyprland 0.56 parses `hyprctl dispatch` as Lua, so it takes
exactly one dispatcher object — `dispatch workspace 12` fails as
`hl.dispatch(workspace 12)`. And `hyprctl keyword` no longer works at
all under that parser: "keyword can't work with non-legacy parsers.
Use eval." eval takes multiple statements, so the whole sequence runs
as one call instead of five racing ones.
Clicking a workspace on the monitor you are already on keeps stock
behaviour.
The monitor names are specific to this machine (HDMI-A-1 / DP-1 /
HDMI-A-2) and live in workspaceGroups + groupMonitors at the top of the
file.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
Per-monitor workspace list for the Omarchy Quickshell bar
34 KiB
Languages
QML
100%