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
@@ -13,11 +13,11 @@ class TestLock:
"""Tests for the lock power action."""
@patch("moonset.power.subprocess.run")
def test_calls_loginctl_lock_session(self, mock_run) -> None:
def test_calls_moonlock(self, mock_run) -> None:
lock()
mock_run.assert_called_once_with(
["loginctl", "lock-session"], check=True, timeout=POWER_TIMEOUT
["moonlock"], check=True, timeout=POWER_TIMEOUT
)
@patch("moonset.power.subprocess.run")