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

Improve powermenu, remove & rename some options

This commit is contained in:
Joe Groocock 2017-01-25 00:47:06 +00:00
parent 3ea1b28101
commit 5d013efbe7
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

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