ssh-agent: nuke agent on lock
This commit is contained in:
8
remove-ssh.bash
Executable file
8
remove-ssh.bash
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
|
||||
while read x; do
|
||||
case "$x" in
|
||||
*"boolean true"*) echo SCREEN_LOCKED; ssh-add -D;;
|
||||
*"boolean false"*) echo SCREEN_UNLOCKED;;
|
||||
esac
|
||||
done
|
||||
Reference in New Issue
Block a user