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