Pi-Writer-400-scripts/TUI-menu.sh
2024-10-03 08:23:47 -04:00

26 lines
655 B
Bash

#!/bin/bash
while true
do
dialog --msgbox "Welcome to the Pi WWriter 400 Main Menu" 0 0
APP=$(dialog --title "please select a option:" --menu "Apps:" 0 0 0 \
1 "Word Processor" \
2 "Spread Sheet" \
3 "dictionary" \
4 "un-mount fashdrive" \
5 "mount flashdrie" \
6 "Terminal" \
3>&1 1>&2 2>&3 3>&-)
case $APP in
1) wordgrinder ;;
2) SC=$(dialog --inputbox "enter path for spread sheet" 0 0 3>&1 1>&2 2>&3 3>&-) && sc $SC ;;
3) DICT=$(dialog --inputbox "enter dictionary search term" 0 0 3>&1 1>&2 2>&3 3>&-) && dict $DICT | less ;;
4) sudo umount ~/data ;;
5) sudo mount /dev/sda1 ~/data ;;
6) clear ; exit ;;
*) clear ; exit ;;
esac
done