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
