nixos/home/.config/rofi/powermenu/powermenu.sh
Greg Leyda beaf5202ca flakes
2022-07-09 11:27:58 -04:00

28 lines
552 B
Bash
Executable file

#!/usr/bin/env bash
rofi_command="rofi -theme $HOME/.config/rofi/powermenu/powermenu.rasi -p "power""
#### Options ###
power_off="襤 "
reboot="勒 "
lock=" "
suspend=" "
log_out="﫼 "
# Variable passed to rofi
options="$power_off\n$reboot\n$suspend\n$log_out"
chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 2)"
case $chosen in
$power_off)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$suspend)
systemctl suspend
;;
$log_out)
bspc quit
;;
esac