omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Laptop panel doesn't get workspace block 0 when a previous internal panel already holds it

Open inumineq opened this issue 2 weeks ago • 1 comments

What happens

default/hypr/monitor-workspaces.lua says the laptop panel claims the first block:

-- The laptop panel claims the first block, so a laptop keeps 1-10 on its own
-- screen whatever is plugged in.

That only holds the first time any monitor is seen. connected() sorts the internal panel first, but assign() only gives a monitor a block when its identity has none yet, and free_block() returns the lowest unused block. If block 0 already belongs to another internal panel (a different make/model/serial), the current laptop panel gets whichever block is free next.

That happened here. ~/.local/state/omarchy/monitor-workspaces had block 0 assigned to an internal panel that is no longer present (AU Optronics 0x8B99), blocks 1–5 to external monitors, and the current panel (Samsung Display Corp. 0x4171, eDP-1) on block 6:

0		AU Optronics 0x8B99
1		<external monitor>
...
5		<external monitor>
6	eDP-1	Samsung Display Corp. 0x4171

What you see, laptop alone:

  • The bar shows 61–65 (labelled 1–5, all empty), then a gap, then workspace 1 as a "guest". Workspace 1 had windows and its owner block 0 has no connected monitor, so reconcile() leaves it in view.
  • Super+1..5 go to workspaces 61–65, not 1–5.

Steps to reproduce

  1. Put a state file in place where block 0 belongs to an internal panel identity other than the current one. In practice: move ~/.local/state to a new laptop, or replace the panel. Simulated: edit the identity on the block 0 line.
  2. Add at least one other block row so the next free block is not 0.
  3. hyprctl reload.
  4. The internal panel gets a block above 0. Super+1 goes to block*10 + 1, and the bar shows the offset block, with any populated workspace 1 after it as a guest.

Expected

When the laptop panel has no block yet, it takes block 0 like the comment says, even if a panel that is not connected holds it now. The old panel can move to a free block, or lose its block, since only one internal panel can be connected at a time.

Suggestion

In assign(), when an internal monitor's identity has no block and block 0 belongs to an identity that is not connected, give block 0 to the current panel and move the stale identity to free_block().

Related, but a separate issue: #18274 (blocks are never released).

Workaround

Swap the block numbers in ~/.local/state/omarchy/monitor-workspaces so the current panel is on 0, then hyprctl reload.

Environment

  • Omarchy 4.5.0-3
  • Intel Core 7 150U, Intel Raptor Lake-U graphics
  • Single internal panel (eDP-1), no external monitors connected at the time

inumineq avatar Nov 13 '26 13:11 inumineq

I read the report and checked the saved-block loader, internal-panel ordering, and block assignment in default/hypr/monitor-workspaces.lua on current quattro (d54cde78f). The allocator retains saved assignments; the current state file is ~/.local/state/omarchy/monitors/workspaces.

My classification is bug, but the required second classifier, deepseek-v4p1-flash, returned no classification. Classification remains unsettled, so this is waiting for classification review. No reproduction or tests ran, and no fix or labels were applied.

GPT-6 in Codex performed this source review (reasoning effort not exposed). No second substantive review ran. The separate main-reviewer availability check passed.

omarchybot avatar Nov 19 '26 03:11 omarchybot