X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=states%2Fsway%2Ffiles%2Flock;h=936b955c261c5eaa930b13763ebf0979433f984d;hb=f795dba46e9dbb0d42d1476363526782387d63af;hp=1c065a72d06510cf7aafff3e5bec19ecea5586cc;hpb=c8d6974e32074717bc7a06cb23688ff8f2bb7934;p=max%2Fsaltfiles.git diff --git a/states/sway/files/lock b/states/sway/files/lock index 1c065a7..936b955 100644 --- a/states/sway/files/lock +++ b/states/sway/files/lock @@ -4,17 +4,7 @@ NAG_MSG="Smartcard is still plugged in, not locking! \ 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 DP-1:~/Pictures/lockscreen_1080_1.png" -LOCK_CMD+=" -i HDMI-A-1:~/Pictures/lockscreen_1080_1.png" -SLEEP_CMD="systemctl suspend" -{% endif %} - +LOCK_CMD="systemctl suspend" if [ $(pgrep -c lock.magnesium) -gt 1 ]; then exit @@ -37,7 +27,5 @@ else done pkill -f "$NAG_MSG" fi - $LOCK_CMD & - sleep 10 - $SLEEP_CMD + $LOCK_CMD fi