aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmal.com>2026-08-06 20:30:45 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:41:34 -0700
commit47eeca0ea806c9bd4a0911d0d0d30bca254e07b7 (patch)
tree989936fc99733a2ebee088354604dc0eb0bd8db2
parent4f49b43a30483ab152d6201182310cf01de87eb5 (diff)
Fixed migrate script for disabled monitors
Signed-off-by: Don Williams <don.e.williams@gmal.com> On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: scripts/migrate-hypr-to-lua.sh
-rw-r--r--CHANGELOG.md2
-rwxr-xr-xscripts/migrate-hypr-to-lua.sh22
2 files changed, 23 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe78c6ca..32c2438f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,8 @@
## Fixed:
+- Lua migration script failed to translate disabled monitors to LUA format
+ - I.e. for `eDP-1` laptop screens
- Fixed `Spring-Curves.lua`
- Hyprland v0.56+ changed springs timing
- Fixed `RainbowBorders` script to work with LUA config
diff --git a/scripts/migrate-hypr-to-lua.sh b/scripts/migrate-hypr-to-lua.sh
index 75a61db9..fb729d7e 100755
--- a/scripts/migrate-hypr-to-lua.sh
+++ b/scripts/migrate-hypr-to-lua.sh
@@ -530,6 +530,8 @@ def parse_startup(path, *, variables=None, visited=None):
return entries
MONITOR_DIRECTIVE_KEYS = {
+ "disable",
+ "disabled",
"mirror",
"bitdepth",
"transform",
@@ -559,6 +561,7 @@ MONITOR_DIRECTIVE_KEYS = {
}
MONITOR_FIELD_MAP = {
+ "disable": "disabled",
"addreserved": "reserved",
"supportswidecolor": "supports_wide_color",
"supportshdr": "supports_hdr",
@@ -591,7 +594,7 @@ def parse_monitors(path):
mode_or_directive = parts[1].lower().replace("-", "_")
extras = []
- if mode_or_directive == "disable":
+ if mode_or_directive in {"disable", "disabled"}:
spec["mode"] = "disable"
entries.append(spec)
continue
@@ -623,6 +626,15 @@ def parse_monitors(path):
]
i += 5
continue
+ if field == "disabled":
+ if i + 1 >= len(extras):
+ spec["disabled"] = "true"
+ i += 1
+ continue
+ value = extras[i + 1].strip()
+ spec["disabled"] = value if value else "true"
+ i += 2
+ continue
if i + 1 >= len(extras):
i += 1
@@ -710,6 +722,14 @@ def emit_monitor(spec):
f" output = {lua_string(spec.get('output', ''))},",
]
+ mode_value = str(spec.get("mode", "")).strip().lower()
+ disabled_value = str(spec.get("disabled", "")).strip().lower()
+ disabled_truthy = {"1", "true", "yes", "on", "disable", "disabled"}
+ if mode_value in {"disable", "disabled"} or disabled_value in disabled_truthy:
+ lines.append(" mode = \"disable\",")
+ lines.append("})")
+ return "\n".join(lines)
+
if "mode" in spec:
lines.append(f" mode = {lua_string(spec['mode'])},")
if "position" in spec:
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage