dotfiles/.config/zsh/.zlogout

15 lines
304 B
Bash
Executable file

#!/bin/zsh
# Clear clipboard
if [[ -n $WAYLAND_DISPLAY ]]; then
wl-copy -c
cliphist wipe
fi
# Kill ssh-agent if it's the only opened session for this user
if [[ $(who | grep "$USER" | wc -l) -le 1 ]]; then
ssh-add -D
pkill -u "$USER" -9 ssh-agent
fi
loginctl terminate-session $XDG_SESSION_ID