In this article, we will read about zenity then explore zenity options.
What is Zenity?
Zenity is a command-line GUI creator program that will display GTK dialogs and return the User’s input. It is preinstalled on versions of Linux. Zenity is also available for macOS and Windows. it works well for simple Bash scripts. Zenity supports:
- Basic forms
- Calendar dialogs
- Color selection dialogs
- List Dialog
- Message and Notification Dialog
- Progress bars and Scales
- Text Entry and Text Information Dialogs
Let’s explore it!
Using the manual, we can list all the available options of zenity, and command in below
It will show all the options
and More options
Lets, explore the zenity using the options
To Show the warning message box. we can use the below command
zenity --warning --title=” Temperature Warning” --text “Temperature in High”
List Dialog -Fast Food list
If you are working with a simple known data set then the List Dialog might be a good fit. Below is an example of where Fast Food list. In this Dialog select the food which you like.
zenity --list --title “Fast Food --text “Select the food which you like” --checklist --column “Select” --column “Name” 1 “Sandwich” 2 “Burger” 3 “Pizza” 4 “Panipuri” 5 “Pasta”
- zenity — file-selection — text=select a file”
- zenity — progress — text=”updating system”
And there are many more commands, we can create and explore ..!!