mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
powermenu: Add a 'Reboot to Windows' option
This commit is contained in:
parent
e99e0e91ed
commit
5c986d3203
@ -1,13 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
option=$(echo " lock| logout| sleep| shutdown| restart" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -location 3 | xargs)
|
option=$(echo " lock| logout| sleep| shutdown| restart| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -location 3 | xargs)
|
||||||
|
|
||||||
case $option in
|
case $option in
|
||||||
lock) ./lock.sh;;
|
lock) ./lock.sh;;
|
||||||
logout) i3-msg exit;;
|
logout) i3-msg exit;;
|
||||||
restart) reboot;;
|
|
||||||
sleep) systemctl suspend;;
|
sleep) systemctl suspend;;
|
||||||
shutdown) poweroff;;
|
shutdown) poweroff;;
|
||||||
|
restart) reboot;;
|
||||||
|
windows)
|
||||||
|
windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4`
|
||||||
|
`sudo efibootmgr -n $windows`
|
||||||
|
reboot;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user