configs/arch-config/scripts/polybar/powermenu

15 lines
776 B
Plaintext
Raw Normal View History

2020-11-24 08:13:22 +01:00
#!/bin/bash
## Created By Aditya Shakya
MENU="$(rofi -sep "|" -dmenu -i -p 'System' -location 7 -xoffset 5 -yoffset -31 -width 10 -hide-scrollbar -line-padding 4 -padding 20 -lines 6 <<< "Lock|Logout|Reboot|Shutdown|Suspend|Hibernate")"
#MENU="$(rofi -sep "|" -dmenu -i -p 'System' -location 3 -xoffset -10 -yoffset 32 -width 10 -hide-scrollbar -line-padding 4 -padding 20 -lines 4 <<< " Lock| Logout| Reboot| Shutdown|Suspend|Hibernate")"
case "$MENU" in
*Lock) betterlockscreen -l ;;
*Logout) i3-msg exit ;;
*Reboot) systemctl reboot ;;
*Shutdown) systemctl poweroff ;;
*Suspend) betterlockscreen -s ;;
*Hibernate) systemctl hibernate
esac