omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Workspace layout toggle (Super+L) ignores the open special workspace / scratchpad

Open r3d3n0d0 opened this issue 1 month ago • 2 comments

Omarchy: 4.0.6-1 Hyprland: 0.56.2

What happens

With the scratchpad open (Super+S), pressing Super+L shows the notification "Workspace layout set to scrolling", but the scratchpad stays in dwindle. The normal workspace behind it gets toggled instead.

Why

omarchy-hyprland-workspace-layout-toggle gets the workspace from hyprctl activeworkspace, which doesn't report special workspaces. The open special workspace does show up in hyprctl monitors -j as specialWorkspace.

Expected

When a special workspace is shown on the focused monitor, toggle that workspace's layout. That means using its name (e.g. special:scratchpad) in the workspace rule and the saved state file. The script's current ^-?[0-9]+$ id check would need adjusting.

Repro

  1. Super+S to open the scratchpad, and put 2+ windows in it
  2. Super+L
  3. hyprctl workspaces -j | jq '.[] | {name, tiledLayout}': special:scratchpad is unchanged, and the regular workspace underneath flipped

Workaround

Add this to ~/.config/hypr/looknfeel.lua:

hl.workspace_rule({ workspace = "special:scratchpad", layout = "scrolling" })

r3d3n0d0 avatar Oct 29 '26 16:10 r3d3n0d0

Hi, I can confirm this on Omarchy 4.5.0-3, Hyprland 0.56.2-4, and Quickshell 0.3.2.r7.g2b4501a-1.

With special:scratchpad open through Super+S, the stock Super+L command updates the ordinary workspace underneath it. The notification says the layout changed, but the visible scratchpad does not follow. This also happened when the notification announced floating mode. The installed toggle still reads the target from hyprctl activeworkspace.

Thanks for #17033. I understand that its scope is fixing the target and persisting the special workspace's tiled layout, with floating intentionally excluded. I have not tested that PR directly.

With Codex assistance, I installed and tested a local configuration workaround. It targets special:scratchpad by name and adds a separate floating mode. My desktop now works as expected. Some integration findings may help a future floating-scratchpad implementation:

Floating scratchpad and Dock integration findings

Floating the windows alone is not enough:

  • DockWindow.qml uses monitor.activeWorkspace, while Dock.qml only reads mode files for positive workspace IDs. Dock visibility and fullscreen handling need to follow the visible special workspace and its mode.
  • DockModel.isDockWindow() excludes scratchpad windows. App selection and restoring minimized windows also need the visible workspace, using special:scratchpad rather than a negative numeric selector.
  • omarchy-hyprland-window-minimize rejects negative workspace IDs, so both Super+M and the titlebar minus button need corresponding support.
  • Minimizing the last scratchpad window exposed the retained-focus behavior already tracked in #17632 / #17646. In this case, the Dock must remain reachable, keyboard focus must leave the hidden window, and a stale activated flag must not cause app selection to skip the minimized window.

For the local workaround, 16 data-model tests passed. Live checks on the built-in display covered all three modes, Dock autohide, fullscreen/maximized windows, minimizing the last window, restoring it to the scratchpad, launching a new terminal there, and preserving ordinary workspace mode files. Multi-monitor selection was covered only by data tests, not an external-display session. These results apply to the local workaround, not to #17033 or the upstream test suite.

The floating/Dock work is additional scope; it does not need to block the existing wrong-target fix. Thanks for working on this!

yemming avatar Nov 18 '26 08:11 yemming

Codex High read the report, current layout-toggle code and PR #17033. The toggle on quattro still selects its target from hyprctl activeworkspace; #17033 changes selection to prefer the focused monitor's open special workspace and already includes Fixes #17013. No code changes or new worker verification were made in this run.

The required second classification model did not return an answer, so classification remains unsettled and this run stopped before verification. The issue remains open for maintainer review, with #17033 as its linked proposed fix. The floating-scratchpad and Dock work described in the latest comment is outside that PR's tiled-layout scope.

omarchybot avatar Nov 18 '26 17:11 omarchybot