3 NAG_MSG="Smartcard is still plugged in, not locking! \
5 NOLOCK_MSG="Smartcard was not removed, did not lock!"
7 LOCK_CMD="systemctl suspend"
9 if [ $(pgrep -c lock.magnesium) -gt 1 ]; then
12 gpg --card-status > /dev/null
14 swaynag -m "$NAG_MSG" --type warning&
17 while [ $? -ne 2 ]; do
18 if [ $counter -gt 20 ]; then
20 swaynag -m "$NOLOCK_MSG" --type error&
25 counter=$(bc <<<"${counter}+1")
26 gpg --card-status > /dev/null