#!/bin/bash

pgrep instantmenu && exit

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

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