38 lines
655 B
Text
38 lines
655 B
Text
|
#!/usr/bin/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)
|
||
|
printf "poweroff"
|
||
|
# systemctl poweroff
|
||
|
;;
|
||
|
$reboot)
|
||
|
printf "reboot"
|
||
|
# systemctl reboot
|
||
|
;;
|
||
|
$lock)
|
||
|
printf "lock"
|
||
|
# light-locker-command -l
|
||
|
;;
|
||
|
$suspend_btn)
|
||
|
printf "suspend"
|
||
|
# mpc -q pause
|
||
|
# amixer set Master mute
|
||
|
# systemctl suspend
|
||
|
;;
|
||
|
$logout_btn)
|
||
|
printf "logout_btn"
|
||
|
# i3-msg exit
|
||
|
;;
|
||
|
esac
|