Shutdown script updated to allow nonroot access

This commit is contained in:
Alexis Jhon Gaspar 2023-09-28 20:40:53 +08:00
parent 18ff5c566b
commit e5579fbe55

View file

@ -5,8 +5,8 @@ USER_OPT1=$(printf "Shutdown\nReboot\nExit\nLock\nKill X" | spmenu -b -l 5 -g 1
case "$USER_OPT1" in
"Shutdown") sudo shutdown now || doas shutdown now ;;
"Reboot") reboot ;;
"Shutdown") sudo shutdown now || doas shutdown now || systemctl shutdown ;;
"Reboot") reboot || systemctl restart ;;
"Exit") loginctl kill-session self;;
"Lock") slock ;;
"Kill X") pkill Xorg || pkill X ;;