3 NAG_MSG="Smartcard is still plugged in, not locking! \
5 NOLOCK_MSG="Smartcard was not removed, did not lock!"
8 {% if grains['host'] == 'magnesium' %}
9 LOCK_CMD+=" -i HDMI-A-2:~/Pictures/lockscreen_1080_1.png"
10 LOCK_CMD+=" -i HDMI-A-3:~/Pictures/lockscreen_1080_2.png"
11 {% elif grains['host'] == 'barium' %}
12 LOCK_CMD+=" -i eDP-1:~/Pictures/lockscreen_1080_1.png"
13 LOCK_CMD+=" -i HDMI-A-1:~/Pictures/lockscreen_1080_1.png"
17 if [ $(pgrep -c lock.magnesium) -gt 1 ]; then
20 gpg --card-status > /dev/null
22 swaynag -m "$NAG_MSG" --type warning&
25 while [ $? -ne 2 ]; do
26 if [ $counter -gt 20 ]; then
28 swaynag -m "$NOLOCK_MSG" --type error&
33 counter=$(bc <<<"${counter}+1")
34 gpg --card-status > /dev/null