2025-03-14 21:59:59 -06:00
|
|
|
# zenity
|
|
|
|
|
|
|
|
|
|
> Display dialogs from the command-line/shell scripts.
|
|
|
|
|
> Return user-inserted values or 1 if error.
|
|
|
|
|
> More information: <https://manned.org/zenity>.
|
|
|
|
|
|
|
|
|
|
- Display the default question dialog:
|
|
|
|
|
|
|
|
|
|
`zenity --question`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Display an info dialog displaying a message:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`zenity --info --text "{{message}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Display a name/password form and output the data separated by ";" ("|" by default):
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`zenity --forms --add-entry "{{name_label}}" --add-password "{{password_label}}" --separator ";"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display a file selection form in which the user can only select directories:
|
|
|
|
|
|
|
|
|
|
`zenity --file-selection --directory`
|
|
|
|
|
|
|
|
|
|
- Display a progress bar which updates its message every second and show a progress percent:
|
|
|
|
|
|
|
|
|
|
`{{(echo "#1"; sleep 1; echo "50"; echo "#2"; sleep 1; echo "100")}} | zenity --progress`
|