1YAD(1) User Commands YAD(1)
2
3
4
6 yad - display GTK+ dialogs from shell scripts or command-line
7
8
10 yad [OPTIONS]
11
12
14 YAD is a program that will display GTK+ dialogs, and return (either in
15 the return code or on standard output) the users input. This allows you
16 to present information, and ask for information from the user, from all
17 manner of shell scripts.
18
19 YAD is the fork of Zenity program.
20
21
23 This program follows the usual GNU command line syntax, with long op‐
24 tions starting with two dashes (`-').
25
26
27 Dialog options
28 --about
29 Display about dialog.
30
31 --app Display application selection dialog.
32
33 --calendar
34 Display calendar dialog.
35
36 --color
37 Display color selection dialog.
38
39 --dnd Display drag-and-drop box.
40
41 --entry
42 Display text entry dialog.
43
44 --icons
45 Display box with shortcut icons.
46
47 --file Display file selection dialog.
48
49 --font Display font selection dialog.
50
51 --form Display form dialog
52
53 --html Display HTML dialog
54
55 --list Display list dialog
56
57 --multi-progress
58 Display multi progress bars dialog.
59
60 --notebook
61 Display notebook dialog.
62
63 --notification
64 Display notification icon.
65
66 --print
67 Display print dialog.
68
69 --progress
70 Display progress indication dialog.
71
72 --text-info
73 Display text information dialog.
74
75 --scale
76 Display scale dialog.
77
78
79 General options
80 --title=TITLE
81 Set the dialog title.
82
83 --window-icon=ICON
84 Set the window icon.
85
86 --width=WIDTH
87 Set the dialog window width.
88
89 --height=HEIGHT
90 Set the dialog window height.
91
92 --posx=NUMBER
93 Set the X position of dialog window. NUMBER can be negative.
94
95 --posy=NUMBER
96 Set the Y position of dialog window. NUMBER can be negative.
97
98 --geometry=WIDTHxHEIGHT+X+Y
99 Use standard X Window geometry notation for placing dialog.
100 When this option is used, width, height, posx, posy, mouse and
101 center options are ignored.
102
103 --timeout=TIMEOUT
104 Set the dialog timeout in seconds.
105
106 --timeout-indicator=POSITION
107 Show timeout indicator in given position. Positions are top,
108 bottom, left or right. Style of indicator may be set through
109 the users CSS styles.
110
111 --kill-parent=[SIGNAL]
112 Send SIGNAL to parent process. Default value of SIGNAL is a
113 SIGTERM. SIGNAL may be specified by it's number or symbolic
114 name with or without SIG prefix. See signal(7) for details
115 about signals.
116
117 --print-xid=[FILENAME]
118 Output X Window ID of a yad's window to the specified file or
119 stderr.
120
121 --plug=KEY
122 Run dialog in plug mode for swallow as a notebook tab. See NOTE‐
123 BOOK section for more.
124
125 --tabnum=NUMBER
126 Set the tab number for plugged dialog. See NOTEBOOK section for
127 more.
128
129 --text=STRING
130 Set the dialog text.
131
132 --text-width=NUMBER
133 Set the maximum dialog text width in characters.
134
135 --text-align=TYPE
136 Set type of dialog text justification. TYPE may be left, right,
137 center or fill.
138
139 --image=IMAGE
140 Set the dialog image which appears on the left side of dialog.
141 IMAGE might be file name or icon name from current icon theme.
142
143 --icon-theme=THEME
144 Use specified GTK icon theme instead of default.
145
146 --keep-icon-size
147 Don't scale icons. This option affects icons outside icon theme.
148
149 --expander=[TEXT]
150 Hide main widget with expander. TEXT is an optional argument
151 with expander's label.
152
153 --button=BUTTON:ID
154 Add the dialog button. May be used multiple times. ID is an exit
155 code or a command. BUTTON may be a yad stock item name for pre‐
156 defined buttons (like yad-close or yad-ok) or text in a form LA‐
157 BEL[!ICON[!TOOLTIP]] where `!' is an item separator. Full list
158 of stock items may be found in section STOCK ITEMS. If no but‐
159 tons specified OK and Cancel buttons used. See EXIT STATUS sec‐
160 tion for more. If ID have a non-numeric value it treats as a
161 command and click on such button doesn't close the dialog.
162
163 --no-buttons
164 Don't show buttons.
165
166 --buttons-layout=TYPE
167 Set buttons layout type. Possible types are: spread, edge,
168 start, end or center. Default is end.
169
170 --no-markup
171 Don't use pango markup in dialog's text.
172
173 --no-escape
174 Don't close dialog if Escape was pressed.
175
176 --escape-ok
177 Escape acts like pressing OK button.
178
179 --always-print-result
180 Print result for any of the return codes. This option doesn't
181 work if timeout was reached or Escape was pressed.
182
183 --use-interp=[INTERP]
184 All commands runs unter specified interpreter. Default is bash
185 -c "%s". This option can reduse quoting in commands. If %s is
186 specified, it will be replaced by the command. Otherwise com‐
187 mand will be appended to the end of command line.
188
189 --uri-handler=CMD
190 Use CMD as uri handler. By default yad uses open-command parame‐
191 ter from settings. URI replace %s in command string or adds as a
192 last part of command line.
193
194 --borders=NUM
195 Set dialog window borders.
196
197 --sticky
198 Make window visible on all desktops.
199
200 --fixed
201 Make window fixed width and height.
202
203 --center
204 Place window on center of screen.
205
206 --mouse
207 Place window under mouse position.
208
209 --on-top
210 Place window over other windows.
211
212 --undecorated
213 Make window undecorated (remove title and window borders).
214
215 --skip-taskbar
216 Don't show window in taskbar and pager.
217
218 --maximized
219 Run dialog window maximized.
220
221 --fullscreen
222 Run dialog in fullscreen mode. This option may not work on all
223 window managers.
224
225 --splash
226 Open window with "splashscreen" window hints. For details see
227 description of _NET_WM_WINDOW_TYPE_SPLASH in EWMH specification.
228 The behavior of dialog with this option is HIGHLY DEPENDS on
229 settings of your window manager.
230
231 --no-focus
232 Dialog window never take focus.
233
234 --close-on-unfocus
235 Close the dialog window when it loose the focus.
236
237 --selectable-labels
238 If set, user can select dialog's text and copy it to clipboard.
239 This option also affects on label fields in form dialog.
240
241 --image-path=PATH
242 Add specified path to the standard list of directories for look‐
243 ing for icons. This option can be used multiple times.
244
245 --rest=FILENAME
246 Read extra arguments from given file instead of command line.
247 Each line of a file treats as a single argument.
248
249 --response=NUMBER
250 Set default exit code to NUMBER instead of 0.
251
252 --css=STRING
253 Read and parse additional GTK+ CSS styles from given data. If
254 STRING is filename, the content of file is loaded. If not STRING
255 treats like CSS data.
256
257 --gtkrc=FILENAME
258 Read and parse additional GTK+ CSS styles from given file. This
259 option is deprecated. Use --css instead.
260
261 --hscroll-policy=TYPE
262 Set the policy type for horizontal scrollbars. TYPE can be one
263 of the auto, always or never. Default is auto.
264
265 --vscroll-policy=TYPE
266 Set the policy type for vertical scrollbars. TYPE can be one of
267 the auto, always or never. Default is auto.
268
269 --enable-spell
270 Enable spell checking in textview widgets
271
272 --spell-lang=LANGUAGE
273 Set spell checking language to LANGUAGE. By default language
274 guesses from current locale. Use option --show-langs for get
275 list of all possible languages.
276
277 --bool-fmt=TYPE
278 Set the output type of boolean values to TYPE. Possible types
279 are T, t, Y, y, O, o and 1.
280 T and t - for true/false pair in appropriate case.
281 Y and y - for yes/no pair in appropriate case.
282 O and o - for on/off pair in appropriate case.
283 1 - for 1/0 pair.
284
285
286 Custom about dialog options
287 --pname=STRING
288 Set programm name.
289
290 --image=IMAGE
291 Set programm icon name.
292
293 --pversion=STRING
294 Set programm version string.
295
296 --copyright=STRING
297 Set programm copyrightstring.
298
299 --comments=STRING
300 Set programm detailed description.
301
302 --license=STRING
303 Set programm license. The value of this option can be one of
304 predefined licenses (GPL2, GPL3, LGPL2, LGPL3, BSD, MIT or
305 ARTISTIC,), file name with license text or arbitrary string.
306
307 --authors=STRING
308 Set list of programm authors separated by comma.
309
310 --website=URI
311 Set a link to programm website.
312
313 --website-label=LABEL
314 Set a label for programm website link.
315
316
317 Application selection options
318 --enable-fallback
319 Show fallback applications.
320
321 --enable-other
322 Show other applications.
323
324 --enable-all
325 Show all available applications.
326
327 --extened
328 Shown extended information about choosen application. By default
329 only executable is shown. In extended form the output fields are
330 name, display name, description, icon and executable.
331
332 Additional argument for application dialog is a mime-type. If mime-type
333 is not specified text/plain will be used.
334
335
336 Calendar options
337 --day=NUMBER
338 Set the calendar day.
339
340 --month=NUMBER
341 Set the calendar month.
342
343 --year=NUMBER
344 Set the calendar year.
345
346 --date-format=PATTERN
347 Set the format for the returned date. By default is `%x'. See
348 strftime(3) for more details.
349
350 --show-weeks
351 Show the week numbers at the left side of calendar.
352
353 --details=FILENAME
354 Read days description from FILENAME.
355
356 File with days details must be in following format:
357
358 <date> <description>
359
360 date field is date in format, specified with --date-format option. de‐
361 scription is a string with date details, which may include Pango
362 markup.
363
364
365 Color selection options
366 --init-color=COLOR
367 Set initial color value.
368
369 --gtk-palette
370 Show system palette inside color dialog. For GTK+3 builds this
371 option shows palette instead of color editor.
372
373 --alpha
374 Add opacity to output color string.
375
376 --palette=[FILENAME]
377 Show palette and set predefined colors from given filename. By
378 default yad use file /etc/X11/rgb.txt.
379
380 --expand-palette
381 Expander for list of user-defined colors will be initially
382 opened.
383
384 --mode=MODE
385 Set output color mode. Possible values are hex or rgb. Default
386 is hex. HEX mode looks like #rrggbbaa, RGB mode - rgba(r, g, b,
387 a). In RGBA mode opacity have values from 0.0 to 1.0.
388
389
390 Drag-and-Drop box options
391 --tooltip
392 Use dialog text as a tooltip for Drag-and-Drop box.
393
394 --command=CMD
395 Run command when data received. Data strings pass to command as
396 an argument or replace %s modifier in a command. By default
397 data just prints to stdout.
398
399 --exit-on-drop=NUMBER
400 Exit after NUMBER of drops was reached. 0 means infinite number
401 of drops, this is the default.
402
403
404 Text entry options
405 --entry-label=STRING
406 Set the entry label text.
407
408 --entry-text=STRING
409 Set the initial entry text or default item in combo-box.
410
411 --hide-text
412 Hide the entry text.
413
414 --completion
415 Use completion instead of combo-box.
416
417 --complete=TYPE
418 Use specific type for extended completion. TYPE can be any for
419 match any of typed words, all for match all of typed words or
420 regex when typed text treats as regular expression.
421
422 --editable
423 Allow make changes to text in combo-box.
424
425 --numeric
426 Use spin button instead of text entry. Additional parameters in
427 command line treats as minimum and maximum values, step value
428 and precisions (in that order). All this values are optional.
429 Default range is from 0 to 65535 with step 1.
430
431 --float-precision=NUMBER
432 Set precision of floating point numbers. By default precision is
433 three digits after point.
434
435 --licon=IMAGE
436 Set an icon on a left side of entry.
437
438 --licon-action=CMD
439 Specify a command which will be run when the left icon clicked.
440 Output of command will be set as entry text.
441
442 --ricon=IMAGE
443 Set an icon on a right side of entry.
444
445 --ricon-action=CMD
446 Specify a command which will be run when the right icon clicked.
447 Output of command will be set as entry text.
448
449 --num-output
450 Output index of active element instead of text for combo-box en‐
451 try.
452
453 Any extra data specified in command line adds as an items of combo-box
454 entry, except of numeric mode.
455
456 If icon specified and icon action is not given, click on icon just
457 clear the entry. Numeric fields will ignore the icons.
458
459
460 Iconbox options
461 --read-dir=PATH
462 Read .desktop files from specified directory.
463
464 --monitor
465 Watch for changes in directory and automatically update content
466 of iconbox.
467
468 --generic
469 Use field GenericName instead of Name for shortcut label.
470
471 --sort-by-name
472 Use field Name instead of filename for sorting items.
473
474 --descend
475 Sort items in descending order. If data reads from stdin this
476 option is useless without --sort-by-name.
477
478 --listen
479 Read data from stdin. Data must be in order - Name, Tooltip,
480 Icon, Command, InTerm separated by newline. InTerm is a case in‐
481 sensitive boolean constant (TRUE or FALSE). Sending FormFeed
482 character clears iconbox.
483
484 --item-width
485 Set items width.
486
487 --icon-size
488 Force using specified icon size. This option doesn't work in
489 compact mode.
490
491 --compact
492 Use compact mode. Icon and name of each item is placed in a sin‐
493 gle row.
494
495 --single-click
496 Activate items by single mouse click. This option may not works
497 properly in case of compact mode.
498
499 --term Pattern for terminal. By default use `xterm -e %s' where %s re‐
500 placed by the command.
501
502 If both directory and stdin specified, content of iconbox will be read
503 from directory.
504
505
506 File selection options
507 --filename=FILENAME
508 Set the filename.
509
510 --multiple
511 Allow selection of multiple filenames in file selection dialog.
512
513 --directory
514 Activate directory-only selection.
515
516 --save Activate save mode.
517
518 --separator=STRING
519 Specify separator character when returning multiple filenames.
520
521 --confirm-overwrite=[TEXT]
522 Confirm file selection if filename already exists. Optional ar‐
523 gument is a text for confirmation dialog.
524
525 --quoted-output
526 Output values will be shell-style quoted.
527
528
529 Font selection options
530 --fontname=FONTNAME
531 Set the initial font. FONTNAME is a string with font representa‐
532 tion in the form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]".
533
534 --preview
535 Set the preview text.
536
537 --separate-output
538 Separate output of selected font description.
539
540 --separator=STRING
541 Set output separator character. Default is `|'.
542
543 --quoted-output
544 Output data will be in shell-style quotes.
545
546
547 Form options
548 --field=LABEL[!TOOLTIP][:TYPE]
549 Add field to form. Type may be H, RO, NUM, CHK, CB, CBE, CE, FL,
550 SFL, DIR, CDIR, FN, MFL, MDIR, DT, SCL, APP, CLR, BTN, FBTN, LBL
551 or TXT.
552 H - hidden field type. All characters are displayed as the in‐
553 visible char.
554 RO - field is in read-only mode.
555 NUM - field is a numeric. Initial value format for this field is
556 VALUE[!RANGE[!STEP![PREC]]], where RANGE must be in form
557 MIN..MAX. `!' is a default item separator. PREC is a precision
558 for decimals.
559 CHK - checkbox field. Initial value is a case insensitive bool‐
560 ean constant (TRUE or FALSE).
561 CB - combo-box field. Initial value is a list VAL1!VAL2!.... The
562 separator is the same as in NUM field. Value started with `^'
563 threats as default for combo-box.
564 CBE - editable combo-box field. Initial value same as for combo-
565 box.
566 CE - entry with completion. Initial value same as for combo-box.
567 FL - file selection button.
568 SFL - field for create file.
569 DIR - directory selection button.
570 CDIR - field for create folder.
571 FN - font selection button. Initial value same as in font dia‐
572 log.
573 MFL - select multiple files. Value of this field is a list of
574 files separated by item-separator.
575 MDIR - select multiple folders. Value of this field is a list of
576 folders separated by item-separator.
577 DT - date field.
578 SCL - scale field. Value of this field in a range 0..100.
579 APP - application selection button. Input value for this field
580 is mime-type. Output value - executable for selected applica‐
581 tion.
582 CLR - color selection button. Output values for this field gen‐
583 erates in the same manner as for color dialog.
584 BTN - button field. Label may be in form text in a form LA‐
585 BEL[!ICON[!TOOLTIP]] where `!' is an item separator. LABEL is a
586 text of button label or yad stock id. ICON is a buttons icon
587 (stock id or file name). TOOLTIP is an optional text for popup
588 help string. Initial value is a command which is running when
589 button is clicked. A special sympols %N in command are replaced
590 by value of field N. If command starts with @, the output of
591 command will be parsed and lines started with number and colon
592 will be treats as a new field values. A quoting style for value
593 when sh -c is used - a single quotes around command and double
594 quotes around -c argument
595 FBTN - same as button field, but with full relief of a button.
596 LINK - link button field.
597 LBL - text label. If field name is empty, horizontal separator
598 line will be shown.
599 TXT - multiline text entry. This field is always occupy all of
600 form width.
601
602 Without type field will be a simple text entry.
603
604 --align=TYPE
605 Set alignment of field labels. Possible types are left, center
606 or right. Default is left.
607
608 --columns=NUMBER
609 Set number of columns in form. Fields will be placed from top to
610 bottom.
611
612 --separator=STRING
613 Set output separator character. Default is `|'.
614
615 --focus-field=NUMBER
616 Set focused field.
617
618 --cycle-read
619 Cycled reading of stdin data. Sending FormFeed character clears
620 the form. This symbol may be sent as echo -e '\f'.
621
622 --align-buttons
623 Align label on button fields according to --align settings.
624
625 --item-separator=STRING
626 Set separator character for combo-box or scale values. Default
627 is `!'.
628
629 --date-format=PATTERN
630 Set the format for the date fields (same as in calendar dialog).
631
632 --float-precision=NUMBER
633 Set precision of floating point numbers. By default precision is
634 three digits after point.
635
636 --complete=TYPE
637 Use specific type for extended completion. TYPE can be any for
638 match any of typed words, all for match all of typed words or
639 regex when typed text treats as regular expression.
640
641 --scroll
642 Make form scrollable.
643
644 --quoted-output
645 Output values will be in shell-style quotes.
646
647 --output-by-row
648 Output field values row by row if several columns is specified.
649
650 --num-output
651 Output index of active element instead of text for combo-box
652 fields.
653
654 Additional data in command line interprets as a default values for form
655 fields. A special value @disabled@ makes corresponding field inactive.
656 If no extra arguments specified in a command line, data will be readed
657 from stdin, one value per line. Cycled reading means that for N fields
658 N+1 value will replace the first field. Empty values are skipped when
659 reading from stdin.
660
661
662 HTML options
663 --uri=URI
664 Open specified location. URI can be a filename or internet ad‐
665 dress. If URI is not an existing file and protocol is not speci‐
666 fied a prefix http:// will be added to URI.
667
668 --browser
669 Turn on browser mode. In this mode all clicked links will be
670 opened in html widget and command Open will be added to context
671 menu.
672
673 --print-uri
674 Print clicked links to standard output. By default clicked links
675 opens with xdg-open.
676
677 --mime=MIME
678 Set mime type of data passed to standard input to MIME. Default
679 is text/html.
680
681 --encodintg=ENCODING
682 Set encoding of data passed to standard input to ENCODING. De‐
683 fault is UTF-8.
684
685 --uri-handler=CMD
686 Set external handler for clicked uri. %s will be replaced by ac‐
687 tivated uri. Return code of the CMD must be 0 for keep working,
688 1 for ignoring uri and 2 for downloading uri. This option works
689 only in browser mode. There are two environment variables avail‐
690 able in handler - YAD_HTML_BUTTON with value of pressed mouse
691 button and YAD_HTML_STATE with value of bitmask with the the
692 state of the modifier keys.
693
694 --user-agent=STRING
695 Set user agent string. Default is YAD-Webkit (@VERSION@)
696
697 --user-style=URI
698 Set path or uri to custom user styles. Path to local file can be
699 an absolute file name or uri with file:// prefix.
700
701 --wk-prop=PROP
702 Set additional WebKit setting. This option may be used multiply
703 times. Setting PROP must be in a form "setting-name value".
704 First character of value must be a type identifier b for bool‐
705 eans, i for integers and s for strings. The values itself fol‐
706 lowing by a colon. List of possible settings can be found on
707 this page - https://webkitgtk.org/reference/webkit2gtk/sta‐
708 ble/WebKitSettings.html
709
710 When dialog works in browser mode additional data in command line in‐
711 terprets as URI.
712
713
714 List options
715 --column=STRING[:TYPE]
716 Set the column header. Types are TEXT, NUM, SZ, FLT, CHK, RD,
717 BAR, IMG, HD or TIP. TEXT type is default. Use NUM for integers
718 and FLT for double values. TIP is used for define tooltip col‐
719 umn. SZ size column type. Works exactly like NUM column but
720 shows human readable sizes instead of numbers. CHK (checkboxes)
721 and RD (radio toggle) are a boolean columns. BAR is a progress
722 bar column. Value must be between 0 and 100. If value is outside
723 is range it will be croped to neares legal value. HD type means
724 a hidden column. Such columns are not displayes in the list,
725 only in output. IMG may be path to image or icon name from cur‐
726 rnet GTK+ icon theme. Size of icons may be set in gtk config
727 file at GTK_ICON_SIZE_MENU position of gtk-icon-sizes. Image
728 field prints as empty value.
729
730 Special column names @fore@, @back@ and @font@ sets correspond‐
731 ing rows attributes. Values of those columns don't show in re‐
732 sults.
733
734 Column title can be specified in form name!tooltip and Pango
735 markup can be used in name and tooltip parts.
736
737 --tree Enbale tree mode. In this mode extra data in form ROW_ID[:PAR‐
738 ENT_ID] must be passed to yad before each row. See EXAMPLES for
739 details.
740
741 --checklist
742 Use check boxes for the first column. Output checked rows in‐
743 stead of selected rows. Disable multiple selection.
744
745 --radiolist
746 Same as --checklist but with a radio toggle for the first col‐
747 umn.
748
749 --separator=STRING
750 Set output separator characters.
751
752 --multiple
753 Allow multiple rows to be selected.
754
755 --editable
756 Allow changes to text.
757
758 --editable-cols=LIST
759 Set the list of editable columns. LIST must be a string of num‐
760 bers separated by comma.
761
762 --no-headers
763 Do not show column headers.
764
765 --no-click
766 Disable sorting of column content by clicking on its header.
767
768 --no-rules-hint
769 Don't draw even and odd rows by a different colors. This option
770 depends on your current gtk theme and may not work.
771
772 --grid-lines=TYPE
773 Draw grid lines of type TYPE in list dialog. TYPE can be one of
774 the hor[izontal], vert[ical] of both.
775
776 --no-selection
777 Disable selection in list.
778
779 --print-all
780 Print all data from the list.
781
782 --print-column=NUMBER
783 Specify what column will be printed to standard output. 0 may be
784 used to print all columns (this is default).
785
786 --hide-column=NUMBER
787 Hide a specific column.
788
789 --expand-column=NUMBER
790 Set the column expandable by default. 0 sets all columns expand‐
791 able.
792
793 --search-column=NUMBER
794 Set the quick search column. 0 mean to disable searching. By de‐
795 fault search mades on first column.
796
797 --tooltip-column=NUMBER
798 Set the column with popup tooltips.
799
800 --sep-column=NUMBER
801 Set the row separator column. If the cell value from this column
802 equal to specified row separator value such row will be draw as
803 separator. Separator value must be set.
804
805 --sep-value=TEXT
806 Set the TEXT as a row separator value. This feature highly de‐
807 pends on your current GTK+ theme and may not work properly.
808
809 --limit=NUMBER
810 Set the number of rows in list dialog. Will be shown only the
811 last NUMBER rows. This option will take effect only when data
812 reading from stdin.
813
814 --wrap-width=NUMBER
815 Set the width of column before wrapping to NUMBER.
816
817 --wrap-cols=LIST
818 Set the list of wrapped columns. LIST must be a string of num‐
819 bers separated by comma.
820
821 --ellipsize=TYPE
822 Set ellipsize mode for text columns. TYPE may be NONE, START,
823 MIDDLE or END.
824
825 --ellipsize-cols=LIST
826 Set the list of ellipsized columns. LIST must be a string of
827 numbers separated by comma.
828
829 --dclick-action=CMD
830 Set the CMD as a double-click command. When user double-clicked
831 on row, CMD will be launched with values of all columns as an
832 arguments. By default double-click selects row and act as OK
833 button for simple lists, set the checkbox if --checklist speci‐
834 fied and do nothing when list run with --multiple option. When
835 double-click specified Enter acts as a double-click and Ctrl+En‐
836 ter acts as an OK button. CMD may contain a special character
837 `%s' for setting a position for arguments. By default arguments
838 will be concatenated to the end of CMD. If CMD starts with @,
839 its output will replace values of current row. This option
840 doesn't work with --editable.
841
842 --select-action=CMD
843 Set the CMD as a action when selection is changed. CMD will be
844 launched with values of all columns as an arguments. CMD may
845 contain a special character `%s' for setting a position for ar‐
846 guments. By default arguments will be concatenated to the end of
847 CMD. This option doesn't work with --multiple.
848
849 --row-action=CMD
850 Set the CMD as a action when the row is added, modified or re‐
851 moved. First argument for the command is the name of action
852 (add, edit or del). The rest of command line is data from se‐
853 lected row. Output of this command sets the new row values.
854
855 --tree-expanded
856 Expand all tree nodes at startup.
857
858 --regex-search
859 Use regular expressions in search for text fields.
860
861 --listen
862 Listen data from stdin even if command-line values was speci‐
863 fied.
864
865 --quoted-output
866 Output values will be shell-style quoted.
867
868 --float-precision=NUMBER
869 Set precision of floating point numbers. By default precision is
870 three digits after point.
871
872 --add-on-top
873 Add new records at the top of the list.
874
875 --tail Autoscroll to the end of the list when a new row will be added.
876
877 --iec-format
878 Use IEC (base 1024) units with for size values. With this option
879 values will have suffixes KiB, MiB, GiB.
880
881 --simple-tips
882 Don't use markup in tooltips even if text has a valid markup.
883
884 --header-tips
885 Use header name as a fallback tooltip text.
886
887 Sending FormFeed character to list clears it. This symbol may be sent
888 as echo -e '\f'.
889
890
891 Notebook options
892 --key=KEY
893 Set the key of the children.
894
895 --tab=TEXT
896 Add tab with specified label to notebook. TEXT may be in a form
897 LABEL[!ICON[!TOOLTIP]] where `!' is an item separator. For
898 stack mode TEXT for label uses as is.
899
900 --tab-pos=TYPE
901 Set the tabs position. Value may be top, bottom, left, or right.
902 Default is top. For stack mode only top or bottom positions
903 available.
904
905 --tab-borders=NUMBER
906 Set the borders width around widget in tabs.
907
908 --active-tab=NUMBER
909 Set active tab.
910
911 --expand
912 Expand all tabs to full width of a dialog window.
913
914 --stack
915 Use stack mode (GtkStack instead of GtkNotebook).
916
917 See NOTEBOOK and PANED section for more about notebook dialog.
918
919
920 Notification options
921 --command=CMD
922 Set the command running when clicked on the icon. Default action
923 is quit if --listen not specified.
924
925 --listen
926 Listen for commands on stdin. See NOTIFICATION section.
927
928 --separator=STRING
929 Set separator character for menu values. Default is |.
930
931 --item-separator=STRING
932 Set separator character for menu items. Default is !.
933
934 --menu=STRING
935 Set initial menu for right-click.
936
937 --no-middle
938 Disable exit on middle click.
939
940 --hidden
941 Doesn't show icon at startup.
942
943 --icon-size=SIZE
944 Set notification icon size to SIZE. This option doesn't works
945 for themed icons.
946
947 See NOTIFICATION section for more about separators.
948
949
950 Paned options
951 --key=KEY
952 Set the key of the children.
953
954 --orient=TYPE
955 Set orientation of panes inside dialog. TYPE may be in hor[izon‐
956 tal] or vert[ical].
957
958 --splitter=POS
959 Set the initial splitter position.
960
961 --focused=PANE
962 Set pane for initial focus. PANE must be 1 or 2. Default is 1.
963
964 See NOTEBOOK and PANED section for more about paned dialog.
965
966
967 Picture options
968 --size=VALUE
969 Set initial size of picture. Available values are fit for fit‐
970 ting image in window or orig for show picture in original size.
971
972 --inc=NUMBER
973 Set increment value for scaling image.
974
975 --filename=FILENAME
976 Set picture filename.
977
978 Some actions on a picture like scaling or rotating available from popup
979 menu. Those actions can be made only on static images.
980
981
982 Print options
983 --type=TYPE
984 Set source file type. TYPE may be a TEXT for text files, IMAGE
985 for image files or RAW for files in postscript or pdf formats.
986
987 --filename=FILENAME
988 Set name or path to the source file.
989
990 --headers
991 Add headers to the top of page with filename and page number.
992 This option doesn't work for RAW type.
993
994 --add-preview
995 Add Preview button to the print dialog. This option doesn't work
996 for RAW type.
997
998 --fontname=FONTNAME
999 Set the font for printing text. FONTNAME is a string with font
1000 representation in the form "[FAMILY-LIST] [STYLE-OPTIONS]
1001 [SIZE]". This option works only for TEXT type.
1002
1003
1004 Progress options
1005 When the --progress option is used, yad reads lines of progress data
1006 from stdin. When the lines begin with # the text after # is displayed
1007 in the progress bar label. Numeric values treats like a persents for
1008 progress bar.
1009
1010 --bar=LABEL[:TYPE]
1011 Add progress bar. LABEL is a text label for progress bar. TYPE
1012 is a progress bar type. Types are: NORM for normal progress
1013 bar, RTL for inverted progress bar and PULSE for pulsate
1014 progress bar. If no bars specified, the progress dialog works
1015 in single-bar mode.
1016
1017 --vertical
1018 Set vertical orientation of progress bars.
1019
1020 --align=TYPE
1021 Set alignment of bar labels. Possible types are left, center or
1022 right. Default is left.
1023
1024 --progress-text=TEXT
1025 Set the label of progress bar to TEXT. This option works only in
1026 single-bar mode.
1027
1028 --hide-text
1029 Hide text in progress bars.
1030
1031 --rtl Set Right-To-Left progress bar direction. This option works only
1032 in single-bar mode.
1033
1034 --auto-close
1035 Close dialog when 100% has been reached.
1036
1037 --auto-kill
1038 Kill parent process if cancel button is pressed.
1039
1040 --pulsate
1041 Pulsate progress bar. This option works only in single-bar mode.
1042
1043 --enable-log[=TEXT]
1044 Show log window. This window gathers all of lines from stdin,
1045 started from # instead of setting appropriate progress text.
1046 Optional argument TEXT is a text label for window expander.
1047
1048 --log-on-top
1049 Place log window above progress bars.
1050
1051 --log-expanded
1052 Start with expanded log window.
1053
1054 --log-height
1055 Set the height of log window.
1056
1057 Initial values for bars sets as an extra arguments. Each lines with
1058 progress data passed to stdin must be started from N: where N is a num‐
1059 ber of progress bar. In a single-bar mode N: is not needed.
1060
1061
1062 Text info options
1063 --filename=FILENAME
1064 Open specified file.
1065
1066 --editable
1067 Allow changes to text.
1068
1069 --wrap Enable text wrapping.
1070
1071 --formatted
1072 Enable Pango markup. This option doesn't work with --editable
1073 option.
1074
1075 --justify=TYPE
1076 Set justification. TYPE may be left, right, center or fill. De‐
1077 fault is left.
1078
1079 --margins=NUMBER
1080 Set text margins to NUMBER.
1081
1082 --tail Autoscroll to end when new text appears. Works only when text is
1083 read from stdin.
1084
1085 --show-cursor
1086 Show cursor in read-only mode.
1087
1088 --show-uri
1089 Make links in text clickable. Links opens with xdg-open command.
1090
1091 --fore=COLOR
1092 Set default color for text.
1093
1094 --back=COLOR
1095 Set default color for background.
1096
1097 --uri-color=COLOR
1098 Set color for links. Default is blue.
1099
1100 --lang=LANGUAGE
1101 Highlight syntax for specified LANGUAGE. This option works only
1102 if yad builds with gtksourceview.
1103
1104 --theme=THEME
1105 Set used theme to THEME. This option works only if yad builds
1106 with gtksourceview. Use option --show-themes for get list of all
1107 available themes.
1108
1109 --listen
1110 Listen data from stdin even if filename was specified.
1111
1112 If fontname option is specified for text dialog, the description
1113 of font must be in CSS style (not in a Pango style). Sending
1114 FormFeed character to text dialog clears it. This symbol may be
1115 sent as echo -e '\f'. Pressing Ctrl+S popups the search entry
1116 in text dialog.
1117
1118
1119 Scale options
1120 --value=VALUE
1121 Set initial value.
1122
1123 --min-value=VALUE
1124 Set minimum value.
1125
1126 --max-value=VALUE
1127 Set maximum value.
1128
1129 --step=VALUE
1130 Set step size.
1131
1132 --enforce-step
1133 Only allow values in step increments.
1134
1135 --page=VALUE
1136 Set paging size. By default page value is STEP*10.
1137
1138 --print-partial
1139 Print partial values.
1140
1141 --hide-value
1142 Hide value.
1143
1144 --vertical
1145 Show vertical scale.
1146
1147 --invert
1148 Invert scale direction.
1149
1150 --inc-buttons
1151 Show buttons on edges of a scale for increasing or decreasing
1152 scale value.
1153
1154 --mark=[NAME]:VALUE
1155 Add a mark to scale. May be used multiple times. NAME is an op‐
1156 tional arguments for set label to mark.
1157
1158
1159 File filters options
1160 --file-filter=NAME | PATTERN1 PATTERN2 ...
1161 Add a filename filter. NAME is a displayed filter name, PATTERN
1162 is a shell-style filename pattern (for example *.txt). This op‐
1163 tion may be used multiple times.
1164
1165 --mime-filter=NAME | MIME1 MIME2 ...
1166 Add a mime-type filter. NAME is a displayed filter name, PATTERN
1167 is a name of mime type (for example text/plain). This option may
1168 be used multiple times.
1169
1170 --image-filter=[NAME]
1171 Add filter for images supported by gdk-pixbuf library. NAME in
1172 as optional name for this filter.
1173
1174 This options applies to all of yad's file chooser dialogs.
1175
1176
1177 File preview options
1178 --add-preview
1179 Add preview widget. Preview images loads from normal (default)
1180 or large thumbnails according to XDG Thumbnails specification
1181 v0.8.0 (http://standards.freedesktop.org/thumbnail-spec/latest/)
1182 or creates by yad for image files and saves as normal or large
1183 thumbnails.
1184
1185 --large-preview
1186 Use large previews by default. This option can be permanently
1187 turned on through yad settings.
1188
1189 This options applies to all of yad's file chooser dialogs.
1190
1191 NOTE: YAD doesn't check mtime for thumbnailed images and doesn't up‐
1192 dates preview if origial file was changed after thumbnail was created.
1193
1194
1195 Miscellaneous options
1196 -?, --help
1197 Show summary of options.
1198
1199 --about
1200 Display an about dialog.
1201
1202 --version
1203 Show version of program.
1204
1205 --show-langs
1206 Show list of possible languages for spell checking. Available
1207 only if yad builds with GtkSpell support.
1208
1209 --show-themes
1210 Show list of possible GtkSourceView themes. Available only if
1211 yad builds with GtkSourceView support.
1212
1213
1214 Also the standard GTK+ options are accepted.
1215
1216
1218 Notebook is a complex dialog which swallow other dialogs in his tabs.
1219 Dialogs identifies by unique key (integer) and must be runs in a spe‐
1220 cial plug mode (--plug option). Following example runs notebook dialog
1221 with two tabs, first has a simple text and second is an entry dialog.
1222
1223 #! /bin/sh
1224
1225 yad --plug=12345 --tabnum=1 --text="first tab with text" &> res1 &
1226 yad --plug=12345 --tabnum=2 --text="second tab" --entry &> res2 &
1227 yad --notebook --key=12345 --tab="Tab 1" --tab="Tab 2"
1228
1229 NOTE: The order of output results for tabs is undefined!
1230
1231 Paned works in a same manner as a notebook with one restriction - only
1232 first and secong plug dialogs will be swallowed to panes.
1233
1234
1236 Allows commands to be sent to yad in the form command:args. Possible
1237 commands are icon, tooltip, visible, action, menu and quit.
1238
1239 icon:ICONNAME
1240 Set notification icon to ICONNAME.
1241
1242 tooltip:STRING
1243 Set notification tooltip.
1244
1245 visible:[true|false|blink]
1246 Set notification icon to visible, invisible or blinking states.
1247
1248 action:COMMAND
1249 Specify the command running when click on the icon. There are
1250 two special commands - menu for popup user defined menu and quit
1251 for exit the program.
1252
1253 menu:STRING
1254 Set popup menu for notification icon. STRING must be in form
1255 name1[!action1[!icon1]]|name2[!action2[!icon2]].... Empty name
1256 add separator to menu. Separator character for values (e.g.
1257 `|') sets with --separator argument. Separator character for
1258 menu items (e.g. `!') sets with --item-separator argument.
1259
1260 quit Exit the program. Middle click on icon also send quit command.
1261
1262
1264 This is a list of predefined items available in yad.
1265
1266
1267 ID Label text Icon name
1268 ─────────────────────────────────────────────
1269 yad-about About help-about
1270 yad-add Add list-add
1271 yad-apply Apply gtk-apply
1272 yad-cancel Cancel gtk-cancel
1273 yad-clear Clear document-clear
1274 yad-close Close window-close
1275
1276 yad-edit Edit gtk-edit
1277 yad-execute Execute system-run
1278 yad-no No gtk-no
1279 yad-ok OK gtk-ok
1280 yad-open Open document-open
1281 yad-print Print document-print
1282 yad-quit Quit application-exit
1283 yad-refresh Refresh view-refresh
1284 yad-remove Remove list-remove
1285 yad-save Save document-save
1286 yad-search Search system-search
1287 yad-settings Settings gtk-preferences
1288 yad-yes Yes gtk-yes
1289
1290
1292 YAD_OPTIONS
1293 This variable can holds some default options for yad. All op‐
1294 tions in this variable may be redefined from command line.
1295
1296 YAD_PID
1297 This variable sets to the value of current dialog's pid and ac‐
1298 cessible in all dialog children.
1299
1300 YAD_XID
1301 This variable sets to the value of current dialog's X Window ID
1302 and accessible in all dialog children. This variable is not set
1303 in print and notification dialogs, and in a dialogs which acts
1304 as a notebook or paned children.
1305
1306
1308 SIGUSR1
1309 Close dialog with 0 exit code.
1310
1311 SIGUSR2
1312 Close dialog with 1 exit code.
1313
1314
1316 0 The user has pressed OK button
1317
1318 1 The user has pressed Cancel button
1319
1320 70 The dialog has been closed because the timeout has been reached.
1321
1322 252 The dialog has been closed by pressing Esc or used the window
1323 functions to close the dialog
1324
1325 Exit codes for user-specified buttons must be specified in command
1326 line. Even exit code mean to print result, odd just return exit code.
1327
1328
1330 The look and feel of yad's dialogs can be customized through gtkrc
1331 file. Here is the names of yad's widgets:
1332
1333
1334 Widget name Widget type Description
1335 ───────────────────────────────────────────────────────────────────────────────────────
1336 yad-dialog-window GtkDialog Dialog window
1337 yad-dialog-image GtkImage Dialog image
1338 yad-dialog-label GtkLabel Dialog text
1339 yad-app-widget GtkAppChooserWidget Application selection widget
1340 yad-calendar-widget GtkCalendar Calendar widget
1341 yad-color-widget GtkColorChooser Color selection widget
1342 yad-color-palette GtkTreeView Predefined colors list
1343 yad-entry-label GtkLabel Entry label
1344 yad-entry-widget GtkEntry Entry widget
1345 yad-entry-spin GtkSpinButton Entry widget for numeric values
1346 yad-entry-combo GtkComboBox Entry widget with combo
1347 yad-entry-edit-combo GtkComboBoxEntry Entry widget with editable combo
1348 yad-file-widget GtkFileChooser File selection widget
1349 yad-font-widget GtkFontChooser Font selection widget
1350 yad-form-flabel GtkLabel Field label in form
1351 yad-form-button GtkButton Button field in form
1352 yad-form-entry GtkEntrfy Entry field in form
1353 yad-form-spin GtkSpinButton Numeric entry field in form
1354 yad-form-check GtkCheckButton Checkbox field in form
1355 yad-form-combo GtkComboBox Combo field in form
1356 yad-form-edit-combo GtkComboBoxEntry Editable combo field in form
1357
1358 yad-form-link GtkLinkButton Link field in form
1359 yad-form-file GtkFileChooserButton File or directory field in form
1360 yad-form-font GtkFontChooserButton Font field in form
1361 yad-form-app GtkAppChooserButton Application field in form
1362 yad-form-color GtkColorChooserButton Color field in form
1363 yad-form-label GtkLabel Label field in form
1364 yad-form-scale GtkScale Scale widget in form
1365 yad-form-separator GtkSeparator Separator in form
1366 yad-form-text GtkTextView Multiline text field in form
1367 yad-icons-full GtkIconView Icons widget for normal mode
1368 yad-icons-compact GtkTreeView Icons widget for compact mode
1369 yad-list-widget GtkTreeView List widget
1370 yad-notebook-widget GtkNotebook Notebook widget
1371 yad-paned-widget GtkPaned Horizontal or vertical pane widget
1372 yad-progress-widget GtkProgressBar Progressbar widget
1373 yad-scale-widget GtkScale Scale widget
1374 yad-stack-widget GtkStack Stack widget
1375 yad-stack-switcher-widget GtkStackSwitcher Stack switcher widget
1376 yad-text-widget GtkTextView Text info widget
1377 yad-timeout-indicator GtkProgreeBar Timeout indicator
1378
1379
1381 YAD keeps settings in gsettings database. Use gsettings list-keys
1382 yad.settings to get list of available settings. Settings values can be
1383 obtained by gsettings get yad.settings <key> and changed by gsettings
1384 set yad.settings <key> <new-value>
1385
1386
1388 Display a file selector with the title Select a file to remove. The
1389 file selected is returned on standard output.
1390
1391 yad --title="Select a file to remove" --file-selection
1392
1393 Display a text entry dialog with the title Select Host and the text Se‐
1394 lect the host you would like to flood-ping. The entered text is re‐
1395 turned on standard output.
1396
1397 yad --title "Select Host" --entry --text "Select the host you
1398 would like to flood-ping"
1399
1400 Display a dialog, asking Microsoft Windows has been found! Would you
1401 like to remove it?. The return code will be 0 (true in shell) if YES is
1402 selected, and 1 (false) if NO is selected.
1403
1404 yad --image "dialog-question" --title "Alert" --button=gtk-
1405 yes:0 --button=gtk-no:1 --text "Microsoft Windows has been
1406 found! Would you like to remove it?"
1407
1408 Show the search results in a list dialog with the title Search Results
1409 and the text Finding all header files....
1410
1411 find . -name '*.h' | yad --list --title "Search Results" --text
1412 "Finding all header files.." --column "Files"
1413
1414 Show an icon in the notification area
1415
1416 yad --notification --image=update.png --text "System update nec‐
1417 essary!" --command "xterm -e apt-get upgrade"
1418
1419 Display a weekly shopping list in a check list dialog with Apples and
1420 Oranges pre selected
1421
1422 yad --list --checklist --column "Buy" --column "Item" TRUE Ap‐
1423 ples TRUE Oranges FALSE Pears FALSE Toothpaste
1424
1425 Display a progress dialog while searching for all the postscript files
1426 in your home directory
1427
1428 find $HOME -name '*.ps' | yad --progress --pulsate
1429
1430 Display a box with all of the installed desktop applications
1431
1432 yad --icons --read-dir=/usr/share/applications
1433
1434 Display list in tree mode
1435
1436 yad --list --tree --column "Items" f Fruits 1:f Apple 2:f Lemon
1437 v Vegetables 3:v Popato 4:v Onion
1438
1439
1441 There are some developers features providing with YAD.
1442
1443 YAD icon browser is a graphical tool for discover icons in current or
1444 user-specified GTK+ icon theme. Launch it as
1445
1446 yad-icon-browser [theme]
1447
1448 When using autoconf you may use special m4 macro AM_PATH_YAD for look‐
1449 ing for yad and check it version. Usage of this macro is
1450
1451 AM_PATH_YAD([MINIMUM-VERSION],\ [ACTION-IF-FOUND],\ [ACTION-IF-
1452 NOT-FOUND])
1453
1455 Yad was written by Victor Ananjevsky <ananasik@gmail.com>. Yad icon
1456 created by Bogdan Lisovich.
1457
1458
1460 gdialog(1), dialog(1), zenity(1)
1461
1462
1463
1464yad April 27, 2020 YAD(1)