aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/swaysession
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/swaysession')
-rwxr-xr-xdotfiles/.local/bin/swaysession12
1 files changed, 8 insertions, 4 deletions
diff --git a/dotfiles/.local/bin/swaysession b/dotfiles/.local/bin/swaysession
index 221ba0e..4dccbb7 100755
--- a/dotfiles/.local/bin/swaysession
+++ b/dotfiles/.local/bin/swaysession
@@ -7,6 +7,7 @@ case "$1" in
lock-color
;;
logout)
+ canberra-gtk-play -i Oxygen-Sys-Log-Out & sleep 1
swaymsg exit
clear
if [ ! -e ~/.cache/dont-kill ]; then
@@ -23,14 +24,17 @@ case "$1" in
lock-color & sleep 1 && $logind hibernate
;;
reboot)
- swaymsg exit
+ canberra-gtk-play -i Oxygen-Sys-Log-Out & sleep 1
clear
- $logind reboot
+ swaymsg exit
+ sudo reboot now
;;
poweroff)
- swaymsg exit
+ canberra-gtk-play -i Oxygen-Sys-Log-Out & sleep 1
clear
- $logind poweroff
+ swaymsg exit
+ # Having problems with logind poweroff and reboot after sway exit
+ sudo poweroff now
;;
*)
if [ "$SWAYSESSION_GUI" = 1 ]; then