mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
22 lines
359 B
Bash
22 lines
359 B
Bash
#!/bin/sh
|
|
|
|
powerlevel=$(echo "Power off\nReboot" | dmenu -i -p "Power off or reboot?")
|
|
|
|
if [ "$powerlevel" = "" ]
|
|
then
|
|
exit
|
|
fi
|
|
|
|
if [ $(echo "No\nYes" | dmenu -i -p "Are you sure?") = "Yes" ]
|
|
then
|
|
if [ "$powerlevel" = "Power off" ]
|
|
then
|
|
exec sudo -A shutdown -hP now
|
|
fi
|
|
|
|
if [ "$powerlevel" = "Reboot" ]
|
|
then
|
|
exec sudo -A reboot
|
|
fi
|
|
fi
|