nix-config/misc/power-menu.sh

9 lines
290 B
Bash
Executable file

cmds=('shutdown now' 'reboot' 'hyprlock' 'hyprctl dispatch exit')
count=${#cmds[@]}
a=$(printf ' Shut down\n Reboot\n Lock\n Log out' | fuzzel --cache /dev/null --dmenu --index --minimal-lines -l $count --placeholder "Power action: " -I)
if [ -n "$a" ]; then
${cmds[a]}
fi