fix(hyprlua): normalize hyprctl mirrorOf "none" to prevent monitor reset
hyprctl returns mirrorOf:"none" (string) for non-mirrored monitors. Python treated it as truthy, causing apply_monitor to always emit a mirror command, resetting resolution and scale on every keypress. Also restores monitors.lua with correct mode/scale/transform fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
280a41133f
commit
b28ee57ebf
|
|
@ -1,7 +1,10 @@
|
||||||
-- generated by monitor-manager -- do not edit by hand
|
-- generated by monitor-manager -- do not edit by hand
|
||||||
hl.monitor({
|
hl.monitor({
|
||||||
output = "eDP-1",
|
output = "eDP-1",
|
||||||
mirror = "none",
|
mode = "1920x1200@60",
|
||||||
|
position = "0x0",
|
||||||
|
scale = 2,
|
||||||
|
transform = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
hl.config({
|
hl.config({
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ class MonitorState:
|
||||||
refresh_rate=rr,
|
refresh_rate=rr,
|
||||||
transform=d.get("transform", 0),
|
transform=d.get("transform", 0),
|
||||||
scale=d.get("scale", 1.0),
|
scale=d.get("scale", 1.0),
|
||||||
mirror_of=d.get("mirrorOf", ""),
|
mirror_of="" if d.get("mirrorOf", "none") in ("none", "") else d["mirrorOf"],
|
||||||
available_modes=modes,
|
available_modes=modes,
|
||||||
mode_index=mode_index,
|
mode_index=mode_index,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue