From b028dd5af784dd2ecc214202bc5e3d4b43dd7d0d Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Sun, 6 Feb 2022 12:38:28 -0500 Subject: [PATCH] Initial commit --- menu | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 menu diff --git a/menu b/menu new file mode 100755 index 0000000..3a460c0 --- /dev/null +++ b/menu @@ -0,0 +1,72 @@ +#!/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