diff options
| -rw-r--r-- | bin/bin/i3-shutdown.py | 9 | ||||
| -rw-r--r-- | i3/.i3/config | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/bin/bin/i3-shutdown.py b/bin/bin/i3-shutdown.py new file mode 100644 index 0000000..56a60b8 --- /dev/null +++ b/bin/bin/i3-shutdown.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 + +from gi.repository import i3ipc +from subprocess import call + +def on_shutdown(conn): + call(["ssh-add", "-D"]) + call(["ssh-agent", "-k"]) + diff --git a/i3/.i3/config b/i3/.i3/config index 250b0cd..d8a572e 100644 --- a/i3/.i3/config +++ b/i3/.i3/config @@ -142,3 +142,4 @@ bindsym $mod+Shift+r restart # display the exit i3 bar bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" +exec_always --no-startup-id ~/bin/i3-shutdown.py |
