Refactor powermenu to rofi modus

This commit is contained in:
Marty Oehme 2019-09-05 16:13:44 +02:00
parent 3d9ea5cffe
commit 49cacfe787
3 changed files with 47 additions and 31 deletions

View file

@ -1,30 +0,0 @@
#!/usr/bin/env sh
rofi_command="rofi -theme themes/powermenu.rasi"
### Options ###
power_off=""
reboot=""
lock=""
suspend_btn="鈴"
logout_btn=""
# Variable passed to rofi
chosen="$(printf "%s\n%s\n%s\n%s\n%s" "$power_off" "$reboot" "$lock" "$suspend_btn" "$logout_btn" | $rofi_command -dmenu -selected-row 2)"
case $chosen in
$power_off)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$lock)
lockscreen
;;
$suspend_btn)
systemctl suspend
;;
$logout_btn)
i3-msg exit
;;
esac