dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/bin/powermenu

29 lines
512 B
Bash
Executable File

#!/usr/bin/env bash
set -euf -o pipefail
rofi_command="rofi -theme customenu"
### Options ###
shutdown="shutdown"
reboot="reboot"
lock="lock"
log_out="log out"
# Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$log_out"
chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 2)"
case $chosen in
$shutdown)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$lock)
exeflock4
;;
$log_out)
bspc quit 1
;;
esac