73 lines
794 B
Bash
Executable File
73 lines
794 B
Bash
Executable File
#!/bin/bash
|
|
|
|
tmpfile="/home/`whoami`/menu.tmp"
|
|
|
|
main () {
|
|
dialog --menu "Select an option:" 0 0 0 "mail" "" "shell" "" "wiki" "" "browser" "" "chat" "" "quit" "" 2>$tmpfile
|
|
return
|
|
}
|
|
|
|
quit () {
|
|
dialog --yesno "Do you want to exit?" 0 0
|
|
response=$?
|
|
case $response in
|
|
0)
|
|
clear
|
|
echo "Just type 'menu' to return!"
|
|
rm $tmpfile
|
|
exit 0;;
|
|
1)
|
|
break;;
|
|
esac
|
|
return
|
|
}
|
|
|
|
email () {
|
|
alpine
|
|
return
|
|
}
|
|
|
|
wiki () {
|
|
elinks https://wiki.thunix.net
|
|
return
|
|
}
|
|
|
|
browser () {
|
|
elinks https://thunix.net
|
|
return
|
|
}
|
|
|
|
chat () {
|
|
weechat
|
|
return
|
|
}
|
|
|
|
shellout () {
|
|
clear
|
|
echo "Just type 'exit' to return to the menu."
|
|
bash -il
|
|
return
|
|
}
|
|
|
|
main
|
|
|
|
selection=`cat $tmpfile`
|
|
|
|
case $selection in
|
|
mail)
|
|
email;;
|
|
shell)
|
|
shellout;;
|
|
wiki)
|
|
wiki;;
|
|
browser)
|
|
browser;;
|
|
chat)
|
|
chat;;
|
|
quit)
|
|
quit;;
|
|
esac
|
|
|
|
|
|
$0
|