Compare commits
2 commits
1a4a0bbe18
...
f7c45ac2ea
Author | SHA1 | Date | |
---|---|---|---|
f7c45ac2ea | |||
74b7c89c25 |
3 changed files with 26 additions and 14 deletions
|
@ -6,7 +6,7 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
"label" : "logout",
|
"label" : "logout",
|
||||||
"action" : "hyprctl dispatch exit",
|
"action" : "~/.config/zsh/.zlogout",
|
||||||
"text" : "Logout",
|
"text" : "Logout",
|
||||||
"keybind" : "e"
|
"keybind" : "e"
|
||||||
}
|
}
|
||||||
|
|
21
.config/zsh/.zlogout
Normal file → Executable file
21
.config/zsh/.zlogout
Normal file → Executable file
|
@ -1,6 +1,21 @@
|
||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# Clear clipboard
|
||||||
|
if [[ -n $WAYLAND_DISPLAY ]]; then
|
||||||
wl-copy -c
|
wl-copy -c
|
||||||
cliphist wipe
|
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
|
pkill -u "$USER" -9 ssh-agent
|
||||||
pkill -u "$USER" -9 pipewire
|
fi
|
||||||
pkill -u "$USER" -9 dbus-daemon
|
|
||||||
killall -u "$USER" -9 kill-wine-explorer.sh
|
if [[ -n $HYPRLAND_INSTANCE_SIGNATURE ]]; then
|
||||||
|
HYPRCMDS=$(hyprctl -j clients | jq -j '.[] | "dispatch closewindow address:\(.address); "')
|
||||||
|
hyprctl -q --batch "$HYPRCMDS"
|
||||||
|
hyprctl dispatch exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
loginctl terminate-session $XDG_SESSION_ID
|
||||||
|
|
|
@ -53,13 +53,10 @@ autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
|
||||||
zle -N up-line-or-beginning-search
|
zle -N up-line-or-beginning-search
|
||||||
zle -N down-line-or-beginning-search
|
zle -N down-line-or-beginning-search
|
||||||
|
|
||||||
# Import colorscheme from 'wal' asynchronously
|
if [[ -z $SSH_TTY ]]; then
|
||||||
# & # Run the process in the background.
|
|
||||||
# # ( ) # Hide shell job control messages.
|
|
||||||
# # Not supported in the "fish" shell.
|
|
||||||
(cat ~/.cache/wal/sequences &)
|
(cat ~/.cache/wal/sequences &)
|
||||||
# # To add support for TTYs this line can be optionally added.
|
# source ~/.cache/wal/colors-tty.sh
|
||||||
source ~/.cache/wal/colors-tty.sh
|
fi
|
||||||
|
|
||||||
# create a zkbd compatible hash;
|
# create a zkbd compatible hash;
|
||||||
# to add other keys to this hash, see: man 5 terminfo
|
# to add other keys to this hash, see: man 5 terminfo
|
||||||
|
|
Loading…
Reference in a new issue