Commit Graph
11 Commits
Author SHA1 Message Date
b63616422f Leave an auto-scaled internal panel alone in clamshell recovery (#7581)
With the default scale = "auto", sync_internal_scale read the config,
rejected "auto" as non-numeric, fell back to the hardcoded default 2,
and force-applied it whenever the compositor's auto resolution differed.
Since the script runs from omarchy-system-wake after every idle cycle,
the panel flapped between 2 and auto's own value (1.5666667 on a 198 DPI
panel) on every wake/reload pair.

A config without a usable number -- "auto", or an expression only
Hyprland's Lua can evaluate -- delegates the scale to the compositor:
whatever it resolved for the enabled panel is the configured scale, so
there is nothing to correct. Recovery of a disabled panel is unchanged
and still re-enables it with the remembered scale, falling back to the
historical default 2.

Fixes #7265. Also the scale-revert half of #7301.


Claude-Session: https://claude.ai/code/session_01L4Z6GimYhR1Kpsir24VAPF

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 13:43:46 +02:00
27d1b6bebc Resolve omarchy_monitor_scale variable reference in clamshell recovery (#6688)
A pinned internal monitor rule that referenced the omarchy_monitor_scale local
had the variable name captured as the scale, so clamshell recovery fell all the
way to the hardcoded 2.

Read the config the way Hyprland writes it: a key's value is whatever sits
between the `=` and the next separator, and a bare word resolves against a local
only when one exists, so a quoted string stays a string. Comments are cut before
anything is matched, and position gets the same resolution since it had the
identical bug.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 13:58:47 +02:00
David Heinemeier HanssonandClaude Opus 5 528a4343a9 Add omarchy-hyprland-monitor-laptop for internal display lookup
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-24 12:28:55 -07:00
Zain Syed e7fc47a44a Respect internal monitor config in clamshell recovery 2026-07-23 13:53:49 +05:30
Stanko K.R. bfefcc7e11 Wake internal display only when leaving clamshell
The clamshell watcher polls omarchy-hyprland-monitor-clamshell every two
seconds and calls enable_internal unconditionally which re-enabled DPMS
on the internal panel each time. When the lock screen blanks the displays,
the next poll of  omarchy-hyprland-monitor-clamshell re-lights the laptop
screen, leaving it showing the lock screen indefinitely while external
monitors stayed off.

Only issue the DPMS wake when the clamshell flag was actually consumed,
i.e. on the lid-open transition the wake was meant for.

If the lid-open even fails to turn on the screen for whatever reason,
then pressing a key or moving the mouse will re-light the screen. This
is configured in `input.lua` via `key_press_enables_dpms = true` and
`mouse_move_enables_dpms = true`
2026-07-18 15:18:05 +02:00
David Heinemeier HanssonandClaude Fable 5 9914513a31 Unify internal monitor detection across scripts
Four scripts matched internal panels with contains("eDP") while
omarchy-monitor-state used test("^(eDP|LVDS|DSI)-"), so laptops with
LVDS or DSI panels were internal to monitor-state but invisible to the
clamshell, mirror, and external-active logic. All five sites now share
the inclusive anchored pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 22:14:33 -07:00
David Heinemeier Hansson e88174fd4b Make clamshell scale recovery idempotent 2026-06-29 15:28:16 -05:00
David Heinemeier Hansson f58f1e8dd4 Preserve internal scale during monitor recovery 2026-06-29 13:36:31 -05:00
David Heinemeier Hansson 6454e7ac8a Fix phantom display scaling by reading configured scale in clamshell 2026-06-29 08:54:10 -05:00
David Heinemeier Hansson aa7350ab60 Fix clamshell display recovery 2026-06-23 09:23:29 +02:00
David Heinemeier Hansson ee65304b92 Handle clamshell monitor hotplug 2026-06-22 21:48:35 +02:00