2018-08-19 11:29:59 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Remove SSH and GPG keys from keystores
|
|
|
|
ssh-add -D
|
|
|
|
echo RELOADAGENT | gpg-connect-agent
|
2021-06-11 21:42:55 +02:00
|
|
|
rm -rf "/tmp/cached_pass_$UID"
|
2018-08-19 11:29:59 +02:00
|
|
|
|
2015-09-26 21:32:00 +02:00
|
|
|
|
|
|
|
dm-tool lock
|
|
|
|
if [ $? -ne 0 ]; then
|
2020-08-08 11:19:48 +02:00
|
|
|
if [ -d ~/.cache/lockpatterns ]
|
|
|
|
then
|
|
|
|
pattern=$(find ~/.cache/lockpatterns/ | sort -R | head -1)
|
|
|
|
else
|
|
|
|
pattern=$HOME/.config/i3/lock.png
|
|
|
|
fi
|
2016-11-23 20:13:26 +01:00
|
|
|
revert() {
|
|
|
|
xset dpms 0 0 0
|
|
|
|
}
|
|
|
|
trap revert SIGHUP SIGINT SIGTERM
|
|
|
|
xset dpms 5 5 5
|
2020-08-08 11:19:48 +02:00
|
|
|
i3lock --nofork --color 648901 --image=$pattern --tiling --ignore-empty-password
|
2016-11-23 20:13:26 +01:00
|
|
|
revert
|
2015-09-26 21:32:00 +02:00
|
|
|
fi
|