Added persistent menu after program launches.
This commit is contained in:
parent
aba04f35b4
commit
cd1f1be424
42
install.sh
42
install.sh
|
@ -1,48 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
main(){
|
main()
|
||||||
|
{
|
||||||
clear
|
clear
|
||||||
|
|
||||||
read -p "Please Press 1 to Install or 2 to Uninstall --> : " INPUT
|
read -p "Please Press 1 to Install or 2 to Uninstall --> : " INPUT
|
||||||
if [ "$INPUT" == 1 ]; then
|
if [[ "$INPUT" == 1 ]]; then
|
||||||
sudo cp shellMen /bin/
|
sudo cp ./shellMen /bin/
|
||||||
sudo chown root:root /bin/shellMen
|
sudo chown root:root /bin/shellMen
|
||||||
sudo chmod +x /bin/shellMen
|
sudo chmod +x /bin/shellMen
|
||||||
elif [ "$INPUT" == 2 ]; then
|
elif [[ "$INPUT" == 2 ]]; then
|
||||||
sudo rm /bin/shellMen
|
sudo rm /bin/shellMen
|
||||||
elif [ "$INPUT" !== 1 ] || [ "$INPUT" !== 2 ] ; then
|
elif [[ "$INPUT" != 1 || "$INPUT" != 2 ]] ; then
|
||||||
echo "Please type 1 or 2."
|
echo "Please type 1 or 2."
|
||||||
|
sleep 2
|
||||||
main
|
main
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
main
|
main
|
||||||
2>"${INPUT}"
|
|
||||||
menuitem=$(<"${INPUT}")
|
|
||||||
case $menuitem in
|
|
||||||
Main_Menu) bash /bin/shellMen ;;
|
|
||||||
esac
|
|
||||||
2>"${INPUT}"
|
|
||||||
menuitem=$(<"${INPUT}")
|
|
||||||
case $menuitem in
|
|
||||||
Main_Menu) bash /bin/shellMen ;;
|
|
||||||
esac
|
|
||||||
2>"${INPUT}"
|
|
||||||
menuitem=$(<"${INPUT}")
|
|
||||||
case $menuitem in
|
|
||||||
Main_Menu) bash /bin/shellMen ;;
|
|
||||||
esac
|
|
||||||
2>"${INPUT}"
|
|
||||||
menuitem=$(<"${INPUT}")
|
|
||||||
case $menuitem in
|
|
||||||
Main_Menu) bash /bin/shellMen ;;
|
|
||||||
esac
|
|
||||||
2>"${INPUT}"
|
|
||||||
menuitem=$(<"${INPUT}")
|
|
||||||
case $menuitem in
|
|
||||||
Main_Menu) bash /bin/shellMen ;;
|
|
||||||
esac
|
|
||||||
2>"${INPUT}"
|
|
||||||
menuitem=$(<"${INPUT}")
|
|
||||||
case $menuitem in
|
|
||||||
Main_Menu) bash /bin/shellMen ;;
|
|
||||||
esac
|
|
||||||
|
|
66
shellMen
66
shellMen
|
@ -32,38 +32,6 @@ settngs="Settings" wine="Wine" pth="/tmp/sysMENU"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mainMENU()
|
|
||||||
{
|
|
||||||
INPUT=/tmp/menu.txt
|
|
||||||
dialog --clear --backtitle "Shellmen" \
|
|
||||||
--title "[ M A I N - M E N U ]" \
|
|
||||||
--menu "Please Select An Option" 16 50 15 \
|
|
||||||
Accessories "General Programs" \
|
|
||||||
System "Main System Programs" \
|
|
||||||
Settings "Main System Settings" \
|
|
||||||
Multimedia "Audio & Video Programs" \
|
|
||||||
Graphics "Image Programs" \
|
|
||||||
Games "Gaming Programs" \
|
|
||||||
Office "Wordprocess & Documents Programs" \
|
|
||||||
Development "Programing Programs" \
|
|
||||||
Internet "Various Internet Related Programs" \
|
|
||||||
Wine "Windows Exe & Program Support" 2>"${INPUT}"
|
|
||||||
menuitem=$(<"${INPUT}")
|
|
||||||
case $menuitem in
|
|
||||||
Accessories) bash "${pth}"/Accessories.sh ;;
|
|
||||||
System) bash "${pth}"/System.sh ;;
|
|
||||||
Settings) bash "${pth}"/Settings.sh ;;
|
|
||||||
Multimedia) bash "${pth}"/Multimedia.sh ;;
|
|
||||||
Graphics) bash "${pth}"/Graphics.sh ;;
|
|
||||||
Games) bash "${pth}"/Game.sh ;;
|
|
||||||
Office) bash "${pth}"/Office.sh ;;
|
|
||||||
Development) bash "${pth}"/Development.sh ;;
|
|
||||||
Internet) bash "${pth}"/Internet.sh ;;
|
|
||||||
Wine) bash "${pth}"/Wine.sh ;;
|
|
||||||
Exit) echo "Bye!"; break ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
startScan()
|
startScan()
|
||||||
{
|
{
|
||||||
clear
|
clear
|
||||||
|
@ -150,7 +118,7 @@ i="1"
|
||||||
execMethod=$(grep -A 0 "Exec=" /usr/share/applications/"$line1")
|
execMethod=$(grep -A 0 "Exec=" /usr/share/applications/"$line1")
|
||||||
catagory=$(grep -A 0 "Categories=" /usr/share/applications/"$line1")
|
catagory=$(grep -A 0 "Categories=" /usr/share/applications/"$line1")
|
||||||
preComment=$(grep -A 0 "Comment=" /usr/share/applications/"$line1")
|
preComment=$(grep -A 0 "Comment=" /usr/share/applications/"$line1")
|
||||||
execCMD=$(echo "${filename}) exec ${filename} ;;")
|
execCMD=$(echo "${filename}) ""${filename} %f 2&>1 /dev/null"" & shellMen ;;")
|
||||||
if [[ "$catagory" == *"$accss"* ]] || [[ "$catagory" == *"$util"* ]]; then
|
if [[ "$catagory" == *"$accss"* ]] || [[ "$catagory" == *"$util"* ]]; then
|
||||||
echo "$execCMD" >> "${pth}"/${accss}.sh
|
echo "$execCMD" >> "${pth}"/${accss}.sh
|
||||||
elif [[ "$catagory" == *"$dev"* ]]; then
|
elif [[ "$catagory" == *"$dev"* ]]; then
|
||||||
|
@ -180,4 +148,36 @@ done
|
||||||
chmod +x "${pth}"/*.sh
|
chmod +x "${pth}"/*.sh
|
||||||
mainMENU;
|
mainMENU;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mainMENU()
|
||||||
|
{
|
||||||
|
INPUT=/tmp/menu.txt
|
||||||
|
dialog --clear --backtitle "Shellmen" \
|
||||||
|
--title "[ M A I N - M E N U ]" \
|
||||||
|
--menu "Please Select An Option" 16 50 15 \
|
||||||
|
Accessories "General Programs" \
|
||||||
|
System "Main System Programs" \
|
||||||
|
Settings "Main System Settings" \
|
||||||
|
Multimedia "Audio & Video Programs" \
|
||||||
|
Graphics "Image Programs" \
|
||||||
|
Games "Gaming Programs" \
|
||||||
|
Office "Wordprocess & Documents Programs" \
|
||||||
|
Development "Programing Programs" \
|
||||||
|
Internet "Various Internet Related Programs" \
|
||||||
|
Wine "Windows Exe & Program Support" 2>"${INPUT}"
|
||||||
|
menuitem=$(<"${INPUT}")
|
||||||
|
case $menuitem in
|
||||||
|
Accessories) bash "${pth}"/Accessories.sh ;;
|
||||||
|
System) bash "${pth}"/System.sh ;;
|
||||||
|
Settings) bash "${pth}"/Settings.sh ;;
|
||||||
|
Multimedia) bash "${pth}"/Multimedia.sh ;;
|
||||||
|
Graphics) bash "${pth}"/Graphics.sh ;;
|
||||||
|
Games) bash "${pth}"/Game.sh ;;
|
||||||
|
Office) bash "${pth}"/Office.sh ;;
|
||||||
|
Development) bash "${pth}"/Development.sh ;;
|
||||||
|
Internet) bash "${pth}"/Internet.sh ;;
|
||||||
|
Wine) bash "${pth}"/Wine.sh ;;
|
||||||
|
Exit) echo "Bye!"; break ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
pre;
|
pre;
|
||||||
|
|
Loading…
Reference in New Issue