From ef398f6e8860a984d7ea77f2aa71961ed9adb21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Fri, 13 Jan 2023 22:45:35 +0300 Subject: Move cleanup from .profile to session script Move cleanup after exiting sway to swaysession script. Should find a better way to handle "runaway" programs after logout from sway. --- dotfiles/.local/bin/swaysession | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dotfiles/.local/bin') diff --git a/dotfiles/.local/bin/swaysession b/dotfiles/.local/bin/swaysession index 2234c11..221ba0e 100755 --- a/dotfiles/.local/bin/swaysession +++ b/dotfiles/.local/bin/swaysession @@ -8,6 +8,10 @@ case "$1" in ;; logout) swaymsg exit + clear + if [ ! -e ~/.cache/dont-kill ]; then + killall -u $(whoami) + fi ;; switch_user) dm-tool switch-to-greeter @@ -19,11 +23,13 @@ case "$1" in lock-color & sleep 1 && $logind hibernate ;; reboot) - rm -f ~/.cache/openvpnpid + swaymsg exit + clear $logind reboot ;; poweroff) - rm -f ~/.cache/openvpnpid + swaymsg exit + clear $logind poweroff ;; *) -- cgit v1.2.3