nixos-config/modules/home/scripts/scripts/shutdown-script.sh
2024-03-21 09:49:58 +01:00

16 lines
430 B
Bash
Executable file

#!/usr/bin/env zsh
respond="$(echo "---------------- Yes ----------------\n-------------- Restart --------------\n---------------- Nah ----------------" | wofi --show dmenu -k /dev/null)"
if [ $respond = '---------------- Yes ----------------' ]
then
echo "shutdown"
shutdown now
elif [ $respond = '-------------- Restart --------------' ]
then
echo "restart"
reboot
else
notify-send "cancel shutdown"
fi