dotfiles/i3/lock.sh

14 lines
582 B
Bash
Raw Normal View History

2019-03-11 10:18:16 +00:00
#!/bin/bash
if ! ssh-add -D; then
notify-send -u normal -i lock -a i3 'Failed to clear SSH key cache' 'ssh-add had a non-zero exit code.'
fi
if ! gpg-connect-agent reloadagent /bye; then
notify-send -u normal -i lock -a i3 'Failed to clear GPG key cache' 'gpg-connect-agent had a non-zero exit code.'
fi
if ! i3lock --tiling --lock-console --show-failed-attempts --color=000000 --image="$HOME/img/bg/Red-billed_streamertail_Trochilus_polytmus_female_in_flight_2_lock.png"; then
notify-send -u normal -i lock -a i3 'Failed to lock screen' 'i3lock had a non-zero exit code.'
fi