Add confirmation for reboot/shutdown

This commit is contained in:
Thomas Dehaeze 2020-11-03 11:39:23 +01:00
parent 58b93e92a4
commit b5fa40b136

View File

@ -580,11 +580,21 @@ Script taken from Luke Smith.
systemctl hibernate && ~/.local/bin/lockscreen
;;
"Reboot")
confirmation=$(echo -e "Yes\nNo" | rofi -i -p "Are you sure you want to Reboot?" -dmenu)
case "$confirmation" in
"Yes")
systemctl reboot
;;
esac
;;
"Shutdown")
confirmation=$(echo -e "Yes\nNo" | rofi -i -p "Are you sure you want to Shutdown?" -dmenu)
case "$confirmation" in
"Yes")
systemctl poweroff
;;
esac
;;
,*)
echo "== ! i3exit: missing or invalid argument ! =="
exit 2