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 %}
done
pkill -f "$NAG_MSG"
fi
- $LOCK_CMD
+ $LOCK_CMD &
+ sleep 10
+ $SLEEP_CMD
fi