YAD
Add useful dialogs to terminal scripts
Quickly create dialogs for your shell scripts and even add notifications or menus with the help of Karsten Günther.
Credit: https://github.com/v1cont/yad
OUR EXPERT
Karsten Günther is a long-time LaTeX, Linux and GIMP user, and has written a number of books on these topics.
T
here are some dialog programs for the shell, most of which are based on
Dialog
and
Zenity,
such as
Yad.
This program is optimised for direct use on BASH and can accept input as well as display output. Here, we’ll first look at some very simple examples.
The main advantages of Yad are the many dialog forms that the program supports – over 20, in fact – and that the developer continuously maintains it. Currently, version 12 is up to date and can be found in the repositories of most distributions.
Yad is controlled by three types of options. First, a “mode” is defined in which Yad should work. yad -h lists the possible modes. Next, options specific to the selected mode control the exact behaviour of Yad. For file selection, typing yad --file --multiple enables you to select more than one file at a time.
Which options are available in a mode should be shown by yad --help-MODUS , but in many cases the information is incomplete. For example, yad --help-file omits the --multiple option. These extra options are described in the man page.