1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Add poweroff alias option to power menu

This commit is contained in:
Joe Groocock 2016-04-30 14:06:10 +01:00
parent 4729f62947
commit 23486ae641

View File

@ -1,13 +1,13 @@
#!/bin/bash
option=$(echo " lock| logout| sleep| shutdown| restart| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -location 3 | xargs)
option=$(echo " lock| logout| sleep| power off| shutdown| restart| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -location 3 | xargs)
case $option in
lock) ./lock.sh;;
logout) i3-msg exit;;
sleep) systemctl suspend;;
shutdown) poweroff;;
restart) reboot;;
shutdown|'power off') systemctl poweroff;;
restart) systemctl reboot;;
windows)
windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4`
`sudo efibootmgr -n $windows`