Add confirmation for reboot/shutdown
This commit is contained in:
parent
a93a3c43e1
commit
5da5ac0e5b
@ -580,11 +580,21 @@ Script taken from Luke Smith.
|
|||||||
systemctl hibernate && ~/.local/bin/lockscreen
|
systemctl hibernate && ~/.local/bin/lockscreen
|
||||||
;;
|
;;
|
||||||
"Reboot")
|
"Reboot")
|
||||||
|
confirmation=$(echo -e "Yes\nNo" | rofi -i -p "Are you sure you want to Reboot?" -dmenu)
|
||||||
|
case "$confirmation" in
|
||||||
|
"Yes")
|
||||||
systemctl reboot
|
systemctl reboot
|
||||||
;;
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
"Shutdown")
|
"Shutdown")
|
||||||
|
confirmation=$(echo -e "Yes\nNo" | rofi -i -p "Are you sure you want to Shutdown?" -dmenu)
|
||||||
|
case "$confirmation" in
|
||||||
|
"Yes")
|
||||||
systemctl poweroff
|
systemctl poweroff
|
||||||
;;
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
,*)
|
,*)
|
||||||
echo "== ! i3exit: missing or invalid argument ! =="
|
echo "== ! i3exit: missing or invalid argument ! =="
|
||||||
exit 2
|
exit 2
|
||||||
|
Loading…
Reference in New Issue
Block a user