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/.local/bin/powermenu

21 lines
420 B
Bash
Executable File

#!/usr/bin/env bash
set -euf -o pipefail
shutdown="shutdown"
reboot="reboot"
suspend="suspend"
lock="lock"
log_out="log out"
options="$shutdown\n$reboot\n$suspend\n$lock\n$log_out"
chosen="$(echo -e "$options" | dmenu -i -p "⏻ ")"
case $chosen in
$shutdown) systemctl poweroff;;
$reboot) systemctl reboot;;
$suspend) systemctl suspend;;
$lock) exeflock4;;
$log_out) bspc quit 1;;
*) exit 0;;
esac