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"
16 if [ $(pgrep -c lock.magnesium) -gt 1 ]; then
19 gpg --card-status > /dev/null
21 swaynag -m "$NAG_MSG" --type warning&
24 while [ $? -ne 2 ]; do
25 if [ $counter -gt 20 ]; then
27 swaynag -m "$NOLOCK_MSG" --type error&
32 counter=$(bc <<<"${counter}+1")
33 gpg --card-status > /dev/null