configs/arch-config/scripts/polybar/powermenu
2021-02-18 21:33:39 +01:00

15 lines
776 B
Bash
Executable File

#!/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