anotherhadi / TheBashMenu

A useful bash script allowing you to easily create your own menu, which uses the directional keys! Quickly add your title, options and commands and you're good to go!

Home Page:https://hadrienaka.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Bash Menu [v1.1]

A very useful script allowing you to create your own menu.

Easily create your own menu, which uses the directional keys. Quickly add your title, options and commands and you're good to go!

Informations:

There is a file named "elements.sh" containing different examples of input, output, reading functions in the same graphic style as "bmenu". You will also find "menuexample.sh", feel free to modify it to create your first menu. Once modified, type "bash menuexample.sh" to try it.

Work on : MacOs, KaliLinux [Probably more, tell me if that's the case]

Install:

git clone https://github.com/hadrienaka/TheBashMenu
cd TheBashMenu
bash install.sh

Create Your Own Menu :

Create a new bash file, then paste:

source bmenu -t "Menu Title" -s "[SubTitle]" -o "Option 1,Option 2,Option 3"

case ${selected} in
	1) TypeYourCommandHere;;
	2) TypeYourCommandHere;;
	3) TypeYourCommandHere;;
esac
! Put a comma between each options

Arguments:

-h, --help               Show brief help
-t, --title              Edit the title
-s, --subtitle           Edit the subtitle
-o, --option             Edit all the options (Put a comma between them)
-a, --alternative        Display an alternative menu (Put -a at the end of the command)
-u, --update             Download the latest version

Alternative Menu

The alternative menu may be a better choice when you have more than 10 options

To display an alternative menu, just add "-a" at the end of your command.

Twitter Follow GitHub followers Website

About

A useful bash script allowing you to easily create your own menu, which uses the directional keys! Quickly add your title, options and commands and you're good to go!

https://hadrienaka.fr


Languages

Language:Shell 100.0%