fix: lock action calls moonlock directly instead of loginctl

loginctl lock-session requires a D-Bus listener that is
difficult to set up reliably. Direct moonlock invocation
is simpler and works immediately.
Also removes CSS fade-in animation (low-fps on layer shell).
This commit is contained in:
2026-03-27 15:12:56 +01:00
parent 004e3d2855
commit 934a92384c
4 changed files with 5 additions and 17 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ POWER_TIMEOUT = 30
def lock() -> None:
"""Lock the current session via loginctl."""
subprocess.run(["loginctl", "lock-session"], check=True, timeout=POWER_TIMEOUT)
"""Lock the current session by launching moonlock."""
subprocess.run(["moonlock"], check=True, timeout=POWER_TIMEOUT)
def logout() -> None:
-12
View File
@@ -6,23 +6,11 @@ window.panel {
background-color: @theme_bg_color;
background-size: cover;
background-position: center;
opacity: 0;
transition: opacity 350ms ease-in;
}
window.panel.visible {
opacity: 1;
}
/* Wallpaper-only window for secondary monitors */
window.wallpaper {
background-color: @theme_bg_color;
opacity: 0;
transition: opacity 350ms ease-in;
}
window.wallpaper.visible {
opacity: 1;
}
/* Round avatar image */