From: Maximilian Friedersdorff Date: Tue, 6 Aug 2019 12:19:34 +0000 (+0100) Subject: Suspend machine after lock X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=9280ed5db9e0c8da54151a747235d6a450d4a7e2;p=max%2Fsaltfiles.git Suspend machine after lock --- 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