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:
@@ -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:
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user