From 494cec4350eba755be8d0984e1239ad9e3e47692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Mon, 6 Mar 2017 23:43:41 +0100 Subject: [PATCH] Forget cached passphrases on screen lock --- files/.config/i3/bin/i3lock | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files/.config/i3/bin/i3lock b/files/.config/i3/bin/i3lock index 5ac5b2f..7995440 100755 --- a/files/.config/i3/bin/i3lock +++ b/files/.config/i3/bin/i3lock @@ -3,4 +3,11 @@ WPDIR=~/Images/wallpapers/ WALLPAPER=$WPDIR/wallpaper_lock.png +if [ -x /usr/bin/gpg-connect-agent ] ; then + [ -f ~/.bash_sshagent ] && source ~/.bash_sshagent + echo "$SSH_AUTH_SOCK" | grep -q gpg && \ + echo "RELOADAGENT" | gpg-connect-agent > /dev/null + echo "FORGET MEH" | xclip -selection clipboard +fi + /usr/bin/i3lock -tefi "$WALLPAPER"