#!/bin/bash

CHOICE="$(echo 'applications
settings
terminal
info
shutdown
documentation
keybindings
close menu' | instantmenu -bw 4 -w 200 -n -l 10 -x 0 -F)"

[ -z "$CHOICE" ] && exit

echo "$CHOICE"
case "$CHOICE" in
applications)
    appmenu &
    ;;
settings)
    instantsettings &
    ;;
info)
    st -e sh -c 'neofetch && sleep 60m' &
    ;;
shutdown)
    instantshutdown &
    ;;
terminal)
    st &
    ;;
documentation)
    firefox 'https://instantos.github.io/instantos.github.io/documentation' &
    ;;
keybindings)
    st -e instanthotkeys &
    ;;
close)
    echo "closed menu"
    ;;
*)
    echo "no choice"
    ;;
esac

exit
