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