From 9280ed5db9e0c8da54151a747235d6a450d4a7e2 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 6 Aug 2019 13:19:34 +0100 Subject: [PATCH] Suspend machine after lock --- states/sway/files/lock | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/states/sway/files/lock b/states/sway/files/lock index 3b01fe1..f78f685 100644 --- a/states/sway/files/lock +++ b/states/sway/files/lock @@ -5,12 +5,14 @@ Remove now to lock." NOLOCK_MSG="Smartcard was not removed, did not lock!" LOCK_CMD="swaylock " +SLEEP_CMD=":" {% if grains['host'] == 'magnesium' %} LOCK_CMD+=" -i HDMI-A-2:~/Pictures/lockscreen_1080_1.png" LOCK_CMD+=" -i HDMI-A-3:~/Pictures/lockscreen_1080_2.png" {% elif grains['host'] == 'barium' %} LOCK_CMD+=" -i eDP-1:~/Pictures/lockscreen_1080_1.png" LOCK_CMD+=" -i HDMI-A-1:~/Pictures/lockscreen_1080_1.png" +SLEEP_CMD="systemctl suspend" {% endif %} @@ -35,5 +37,7 @@ else done pkill -f "$NAG_MSG" fi - $LOCK_CMD + $LOCK_CMD & + sleep 10 + $SLEEP_CMD fi -- 2.46.2