2016-04-02 17:59:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-01-25 00:47:06 +00:00
|
|
|
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)
|
2016-04-02 17:59:24 +00:00
|
|
|
|
|
|
|
case $option in
|
|
|
|
lock) ./lock.sh;;
|
|
|
|
logout) i3-msg exit;;
|
|
|
|
sleep) systemctl suspend;;
|
2017-01-25 00:47:06 +00:00
|
|
|
power\ off) systemctl poweroff;;
|
|
|
|
reboot) systemctl reboot;;
|
2016-04-04 03:04:20 +00:00
|
|
|
windows)
|
|
|
|
windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4`
|
2017-01-25 00:47:06 +00:00
|
|
|
sudo efibootmgr -n $windows
|
2017-10-03 08:43:51 +00:00
|
|
|
systemctl reboot;;
|
2016-04-02 17:59:24 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|