Recover the startup cursor across Hyprland reloads
Hyprland discards Lua globals and timers during reload, so the pending startup reveal must survive outside Lua state. Preserve the normal cursor theme for this compositor session, recover orphaned blank settings, and repair activation environments before future applications inherit them. 🤖 Generated by GPT-6.1-Sol High in Codex through T3 Code. Reviewed by GPT-6.1-Sol XHigh in Codex through T3 Code. Co-Authored-By: GPT-6.1-Sol XHigh <codex@openai.com>
This commit is contained in:
1 parent
77bfaca408
commit
f5170dd070
3 files changed
+135
-11
No files matched your search
@@ -67,6 +67,9 @@ with tempfile.TemporaryDirectory() as directory:
|
||||
time.sleep(0.01)
|
||||
|
||||
wait_phase("holding")
|
||||
subprocess.run(["hyprctl", "reload"], env=env, check=True, capture_output=True, timeout=5)
|
||||
subprocess.run(["hyprctl", "eval", "assert(omarchy_startup_cursor_pending, 'reload lost the pending cursor reveal')"],
|
||||
env=env, check=True, capture_output=True, timeout=5)
|
||||
(stage / "release").write_text("reveal")
|
||||
wait_phase("revealed")
|
||||
# Cursor visibility is polled by the compositor independently of the fade.
|
||||
@@ -78,6 +81,9 @@ with tempfile.TemporaryDirectory() as directory:
|
||||
if float(green) > 20:
|
||||
break
|
||||
assert time.monotonic() < deadline, "the normal cursor did not return with the desktop"
|
||||
except Exception:
|
||||
print((stage / "compositor.log").read_text())
|
||||
raise
|
||||
finally:
|
||||
os.killpg(compositor.pid, signal.SIGTERM)
|
||||
compositor.wait(timeout=10)
|
||||
|
||||
Reference in new issue
Block a user