From b28ee57ebf52bff0bbd716b9634b254c4b3a3789 Mon Sep 17 00:00:00 2001 From: The_miro Date: Tue, 23 Jun 2026 09:39:10 +0200 Subject: [PATCH] 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 --- desktopenvs/hyprlua/hypr/usr/monitors.lua | 7 +++++-- desktopenvs/hyprlua/scripts/monitor-manager | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/desktopenvs/hyprlua/hypr/usr/monitors.lua b/desktopenvs/hyprlua/hypr/usr/monitors.lua index c1b36b1..40be34a 100644 --- a/desktopenvs/hyprlua/hypr/usr/monitors.lua +++ b/desktopenvs/hyprlua/hypr/usr/monitors.lua @@ -1,7 +1,10 @@ -- generated by monitor-manager -- do not edit by hand hl.monitor({ - output = "eDP-1", - mirror = "none", + output = "eDP-1", + mode = "1920x1200@60", + position = "0x0", + scale = 2, + transform = 0, }) hl.config({ diff --git a/desktopenvs/hyprlua/scripts/monitor-manager b/desktopenvs/hyprlua/scripts/monitor-manager index 46272ee..29d3b61 100755 --- a/desktopenvs/hyprlua/scripts/monitor-manager +++ b/desktopenvs/hyprlua/scripts/monitor-manager @@ -126,7 +126,7 @@ class MonitorState: refresh_rate=rr, transform=d.get("transform", 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, mode_index=mode_index, )