HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

yad — Display GTK+ dialogs from shell scripts. See also: `zenity`. More information: <https://manned.org/y

Submitted by: @import:tldr-pages··
0
Viewed 0 times
shellcommanddialogsfromyadgtkclidisplay
linux

Problem

How to use the yad command: Display GTK+ dialogs from shell scripts. See also: zenity. More information: <https://manned.org/yad>.

Solution

yad — Display GTK+ dialogs from shell scripts. See also: zenity. More information: <https://manned.org/yad>.

Display the contents of a file in a text information dialog:
yad --text-info --filename {{path/to/file}}


Open a text entry dialog and return the input to stdout:
yad --entry --text "{{message}}"


Open a file picker with a specific title:
yad --file --title "{{title_message}}"


Open a date picker dialog with a specific title:
yad --calendar --title "{{title_message}}"


Display a list dialog with multiple columns and data:
yad --list --column "{{col1}}" --column "{{col2}}" {{col1_row1 col2_row1 col1_row2 col2_row2 ...}}


Open a pulsating progress bar that automatically closes at 100%:
{{command}} | yad --progress --pulsate --auto-close --text "{{message}}"

Code Snippets

Display the contents of a file in a text information dialog

yad --text-info --filename {{path/to/file}}

Open a text entry dialog and return the input to `stdout`

yad --entry --text "{{message}}"

Open a file picker with a specific title

yad --file --title "{{title_message}}"

Open a date picker dialog with a specific title

yad --calendar --title "{{title_message}}"

Display a list dialog with multiple columns and data

yad --list --column "{{col1}}" --column "{{col2}}" {{col1_row1 col2_row1 col1_row2 col2_row2 ...}}

Context

tldr-pages: linux/yad

Revisions (0)

No revisions yet.