1YAD(1)                      General Commands Manual                     YAD(1)
2
3
4

NAME

6       yad - display GTK+ dialogs
7
8

SYNOPSIS

10       yad [options]
11
12

DESCRIPTION

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
16       you to present information, and ask for information from the user, from
17       all manner of shell scripts.
18
19       YAD is the fork of Zenity program.
20
21

OPTIONS

23       This program follows the usual  GNU  command  line  syntax,  with  long
24       options starting with two dashes (`-').
25
26
27       Dialog options
28
29       --calendar
30              Display calendar dialog.
31
32       --color
33              Display color selection dialog.
34
35       --dnd  Display drag-and-drop box.
36
37       --entry
38              Display text entry dialog.
39
40       --icons
41              Display box with shortcut icons.
42
43       --file Display file selection dialog.
44
45       --font Display font selection dialog.
46
47       --form Display form dialog
48
49       --list Display list dialog
50
51       --notification
52              Display notification icon.
53
54       --progress
55              Display progress indication dialog.
56
57       --text-info
58              Display text information dialog.
59
60       --scale
61              Display scale dialog.
62
63
64       General options
65
66       --title=TITLE
67              Set the dialog title.
68
69       --window-icon=ICONPATH
70              Set the window icon.
71
72       --width=WIDTH
73              Set the dialog width.
74
75       --height=HEIGHT
76              Set the dialog height.
77
78       --timeout=TIMEOUT
79              Set the dialog timeout in seconds.
80
81       --timeout-indicator=POSITION
82              Show  timeout  indicator  in  given position. Positions are top,
83              bottom, left or right.  Style of indicator may  be  set  through
84              the  gtkrc  file.   See  http://code.google.com/p/yad/wiki/Time
85              outIndicator for details.
86
87       --kill-parent
88              Send SIGTERM to parent process.
89
90       --text=STRING
91              Set the dialog text.
92
93       --image=IMAGE
94              Set the dialog image which appears on the left side  of  dialog.
95              IMAGE might be file name or icon name from current icon theme.
96
97       --image-on-top
98              Show image above main widget instead of left.
99
100       --icon-theme=THEME
101              Use specified GTK icon theme instead of default.
102
103       --expander=TEXT
104              Hide  main  widget  with  expander. TEXT is an optional argument
105              with expander's label.
106
107       --button=BUTTON:ID
108              Add the dialog button. May be used several times. ID is an  exit
109              code.   BUTTON may be gtk stock item name for predefined buttons
110              (like gtk-close or gtk-ok) or simple text label.  Full  list  of
111              stock  items may be found in gtk-demo program, in snippet called
112              "Stock Items and Icon Browser".  If no buttons specified OK  and
113              Cancel buttons used. See EXIT STATUS section for more.
114
115       --no-buttons
116              Don't show buttons.
117
118       --no-markup
119              Don't use pango markup in dialog's text.
120
121       --always-print-result
122              Always print result.
123
124       --dialog-sep
125              Show  separator  between  dialog  and  buttons.  Works only with
126              gtk+-2.0.
127
128       --borders=NUM
129              Set dialog window borders.
130
131       --sticky
132              Make window visible on all desktops.
133
134       --fixed
135              Make window fixed width and height.
136
137       --center
138              Place window on center of screen.
139
140       --mouse
141              Place window under mouse position.
142
143       --on-top
144              Place window over other windows.
145
146       --undecorated
147              Make window undecorated (remove title and window borders).
148
149       --skip-taskbar
150              Don't show window in taskbar and pager.
151
152       --geometry=WIDTHxHEIGHT+X+Y
153              Use standard X Window  geometry  notation  for  placing  dialog.
154              When  this  option  is  used,  width,  height,  mouse and center
155              options are ignored.
156
157       --selectable-labels
158              If set, user can select dialog's text and copy it to  clipboard.
159              This option also affects on label fields in form dialog.
160
161
162       Calendar options
163
164       --day=INT
165              Set the calendar day.
166
167       --month=INT
168              Set the calendar month.
169
170       --year=INT
171              Set the calendar year.
172
173       --date-format=PATTERN
174              Set  the  format  for the returned date. By default is `%x'. See
175              strftime(3) for more details.
176
177       --details=FILENAME
178              Read days description from IFILENAMEP.
179
180       File with days details must be in following format:
181
182              <date> <description>
183
184       date field is date in  format,  specified  with  --date-format  option.
185       description  is  a  string  with  date details, which may include Pango
186       markup.
187
188
189       Color selection options
190
191       --init-color=COLOR
192              Set initial color value.
193
194       --extra
195              Show extra information about color in returned string.
196
197       --palette[=FILENAME]
198              Show palette ans set predefined colors from given filename.   By
199              default used /etc/X11/rgb.txt.
200
201
202       Drag-and-Drop box options
203
204       --command=CMD
205              Run  command when data received. Data strings pass to command as
206              an agrument.  By default data just prints to stdout.
207
208
209       Text entry options
210
211       --entry-label=STRING
212              Set the entry label text.
213
214       --entry-text=STRING
215              Set the initial entry text.
216
217       --hide-text
218              Hide the entry text.
219
220       --completion
221              Use completion instead of combo-box.
222
223       --editable
224              Allow changes to text in combo-box.
225
226       --numeric
227              Use spin button instead of text entry. Additional parameters  in
228              command line treats as minimum and maximum values and step value
229              (in that order). All this values are optional. Default range  is
230              from 0 to 65535 with step 1.
231
232       --licon
233              Set an icon on a left side of entry.
234
235       --licon-action
236              Specify  a command which will be run when the left icon clicked.
237              Output of command will be set as entry text.
238
239       --ricon
240              Set an icon on a right side of entry.
241
242       --ricon-action
243              Specify a command which will be run when the right icon clicked.
244              Output of command will be set as entry text.
245
246              Any  extra  data  specified  in command line adds as an items of
247              combo-box entry, except of numeric mode.
248
249              If icon specified and icon action is not given,  click  on  icon
250              just clear the entry.  Icons are available only for entry field.
251              Numeric field or combo-boxes will ignore the icons.
252
253
254       Iconbox options
255
256       --read-dir=DIRECTORY
257              Read .desktop files from specified directory.
258
259       --generic
260              Use field GenericName instead of Name for shortcut label.
261
262       --sort-by-name
263              Use field Name instead of filename for sorting items.
264
265       --descend
266              Sort items in descending order. If data reads  from  stdin  this
267              option is useless without --sort-by-name.
268
269       --stdin
270              Read  data  from  stdin.  Data must be in order - Name, Tooltip,
271              Icon, Command, InTerm separated by newline.  InTerm  is  a  case
272              insensitive boolean constant (TRUE or FALSE).
273
274       --item-width
275              Set items width.
276
277       --term Pattern  for  terminal.  By  default  use `xterm -e %s' where %s
278              replaced by the command.
279
280              If both directory and stdin specified, content of  iconbox  will
281              be read from directory.
282
283
284       File selection options
285
286       --filename=FILENAME
287              Set the filename.
288
289       --multiple
290              Allow selection of multiple filenames in file selection dialog.
291
292       --directory
293              Activate directory-only selection.
294
295       --save Activate save mode.
296
297       --separator=STRING
298              Specify separator character when returning multiple filenames.
299
300       --confirm-overwrite[=TEXT]
301              Confirm  file  selection  if  filename already exists.  Optional
302              argument is a text for confirmation dialog.
303
304
305       Font selection options
306
307       --fontname=FONTNAME
308              Set the initial font. FONTNAME is a string with font representa‐
309              tion in the form [FAMILY-LIST] [STYLE-OPTIONS] [SIZE].
310
311       --preview
312              Set the preview text.
313
314
315       Form options
316
317       --field=LABEL[:TYPE]
318              Add  field  to  form.  Type may be H, RO, NUM, CHK, CB, CBE, FL,
319              DIR, FN, MFL, DT, CLR,BTN or LBL.  H - hidden  field  type.  All
320              characters  are  displayed as the invisible char.  RO - field is
321              in read-only mode.  NUM - field is a numeric. Initial value for‐
322              mat  for this field is VALUE[!RANGE[!STEP]], where RANGE must be
323              in form MIN..MAX. `!' is a default item separator.  CHK - check‐
324              box  field. Initial value is a case insensitive boolean constant
325              (TRUE or FALSE).  CB - combo-box field. Initial value is a  list
326              VAL1!VAL2!.... The separator is the same as in NUM field.  CBE -
327              editable combo-box field. Initial value same as  for  combo-box.
328              FL  -  file selection button.  DIR - directory selection button.
329              FN - font selection button. Initial value same as in  font  dia‐
330              log.  MFL - select multiple files. Value of this field is a list
331              of files separated by item-separator.  DT - date field.   CLR  -
332              color  selection button.  BTN - button field. Initial value is a
333              command runs when button is clicked.  LBL - text label. If field
334              name is empty, horisontal separator line will be shown.
335
336       --align=TYPE
337              Set  alignment of fields labels. Possible types are left, center
338              or right. Default is left.
339
340       --columns=NUMBER
341              Set number of columns in form. Fields will be placed from top to
342              bottom.
343
344       --separator=STRING
345              Set output separator character. Default is `|'.
346
347       --item-separator=STRING
348              Set  separator  character for combo-box or scale values. Default
349              is `!'.
350
351       --date-format=PATTERN
352              Set the format for the date fields (same as in calendar dialog).
353
354       Additional data in command line interprets as a default values for form
355       fields.
356
357
358       List options
359
360       --column=STRING[:TYPE]
361              Set  the  column  header.  Types are TEXT, NUM, FLT, CHK, IMG or
362              TIP.  TEXT type is default. Use NUM for  integers  and  FTL  for
363              double  values.  TIP is used for define tooltip column.  IMG may
364              be path to image or icon name  from  currnet  GTK+  icon  theme.
365              Size  of  icons may be set in config file. Image field prints as
366              empty value.
367
368              Special column names @fore@, @back@ and @font@ sets  correspond‐
369              ing  rows  attributes.   Values  of  those columns don't show in
370              results.
371
372       --checklist
373              Use check boxes for first column.
374
375       --separator=STRING
376              Set output separator characters.
377
378       --multiple
379              Allow multiple rows to be selected.
380
381       --editable
382              Allow changes to text.
383
384       --no-headers
385              Do not show column headers
386
387       --print-all
388              Print all data from the list.
389
390       --print-column=NUM
391              Specify what column will be printed to standard output. 0 may be
392              used to print all columns (this is default).
393
394       --hide-column=NUMBER
395              Hide a specific column.
396
397       --expand-column=NUMBER
398              Set the column expandable by default. 0 sets all columns expand‐
399              able.
400
401       --search-column=NUMBER
402              Set the quick search column. 0 mean  to  disable  searching.  By
403              default search mades on first column.
404
405       --limit=NUMBER
406              Set  the  number  of rows in list dialog. Will be shown only the
407              last NUMBER rows. This option will take effect  only  when  data
408              reading from stdin.
409
410       --ellipsize=TYPE
411              Set  ellipsize  mode  for text columns. TYPE may be NONE, START,
412              MIDDLE or END.
413
414       --dclick-action=CMD
415              Set the CMD as a double-click command. When user  double-clicked
416              on  row,  CMD  will be launched with values of all columns as an
417              arguments. By default double-click selects row  and  act  as  OK
418              button  for simple lists, set the checkbox if --checklist speci‐
419              fied and do nothing when list run with --multiple option.   When
420              double-click   specified   Enter  acts  as  a  double-click  and
421              Ctrl+Enter acts as an OK button.   CMD  may  contain  a  special
422              character  `%s' for setting a position for arguments. By default
423              arguments will be concatenated to the end of CMD.
424
425       --regex-search
426              Use regular expressions in search for text fields.
427
428
429       Notification options
430
431       --command=CMD
432              Set the command running when clicked on the icon.
433
434       --listen
435              Listen for commands on stdin. See NOTIFICATION section.
436
437       --separator=STRING
438              Set separator character for menu values. Default is `|'.
439
440       --item-separator=STRING
441              Set separator character for menu items. Default is `!'.
442
443       See NOTIFICATION section for more about separators.
444
445
446       Progress options
447
448       When the --progress option is used, yad reads lines  of  progress  data
449       from  stdin.  When the lines begin with # the text after # is displayed
450       in the progress bar label. Numeric values treats like  a  persents  for
451       progress bar.
452
453       --progress-text=STRING
454              Set text in progress bar to STRING.
455
456       --percentage=INT
457              Set initial percentage.
458
459       --rtl  Set Right-To-Left progress bar direction.
460
461       --auto-close
462              Close dialog when 100% has been reached.
463
464       --auto-kill
465              Kill parent process if cancel button is pressed.
466
467       --pulsate
468              Pulsate progress bar.
469
470
471       Text options
472
473       --filename=FILENAME
474              Open specified file.
475
476       --editable
477              Allow changes to text.
478
479       --fore=COLOR
480              Set foreground color of text
481
482       --back=COLOR
483              Set background color of text
484
485       --fontname=FONT
486              Set text font. FONT must be in a Pango font description format.
487
488       --wrap Enable text wrapping.
489
490       --justify=TYPE
491              Set  justification.  TYPE  may  be  left, right, center or fill.
492              Default is left.
493
494       --margins=SIZE
495              Set text margins to SIZE.
496
497       --tail Autoscroll to end when new text appears. Works only when text is
498              read from stdin.
499
500       --show-uri
501              Make URI in text clickable. Links opens with xdg-open command.
502
503
504       Scale options
505
506       --value=VALUE
507              Set initial value.
508
509       --min-value=VALUE
510              Set minimum value.
511
512       --max-value=VALUE
513              Set maximum value.
514
515       --step=VALUE
516              Set step size.
517
518       --page=VALUE
519              Set paging size. By default page value is STEP*10.
520
521       --print-partial
522              Print partial values.
523
524       --hide-value
525              Hide value.
526
527       --vertical
528              Show vertical scale.
529
530       --invert
531              Invert scale direction.
532
533       --mark=[NAME]:VALUE
534              Add  a  mark  to  scale.  May be used multiply times. NAME is an
535              optional arguments for set label to mark.
536
537
538       Miscellaneous options
539
540       -?, --help
541              Show summary of options.
542
543       --about
544              Display an about dialog.
545
546       --version
547              Show version of program.
548
549
550       Also the standard GTK+ options are accepted.
551
552

NOTIFICATION

554       Allows commands to be sent to yad in the form  command:args.   Possible
555       commands are icon, tooltip, visible, action, menu and quit.
556
557       icon:ICONNAME
558              Set notification icon to ICONNAME.
559
560       tooltip:STRING
561              Set notification tooltip.
562
563       visible:[true|false|blink]
564              Set notification icon to visible, invisible or blinking states.
565
566       action:COMMAND
567              Specify  the  command  running  when double-clicked on the icon.
568              Special string "quit" exit the program.
569
570       menu:STRING
571              Set popup menu for notification icon.  STRING must  be  in  form
572              name1!action1|name2!action2....   Empty  name  add  separator to
573              menu.  Separator character  for  values  (e.g.  `|')  sets  with
574              --separator  argument.  Separator character for menu items (e.g.
575              `!') sets with --item-separator argument.
576
577       quit   Exit the program. Middle click on icon also send quit command.
578
579

USER DEFINED SIGNALS

581       SIGUSR1
582              Close dialog with 0 exit code.
583
584       SIGUSR2
585              Close dialog with 1 exit code.
586
587

EXIT STATUS

589       0      The user has pressed OK button
590
591       1      The user has pressed Cancel button
592
593       70     The dialog has been closed because the timeout has been reached.
594
595       252    The dialog has been closed by pressing Esc or  used  the  window
596              functions to close the dialog
597
598       Exit  codes  for  user-specified  buttons  must be specified in command
599       line. Even exit code mean to print result, odd just return exit code.
600
601

WIDGETS NAMES

603       The look and feel of yad's dialogs  can  be  customized  through  gtkrc
604       file. Here is the names of yad's widgets:
605
606
607              Widget name             Widget type             Description
608              ─────────────────────────────────────────────────────────────────────────────────
609              yad-dialog-window       GtkDialog               Dialog window
610              yad-dialog-image        GtkImage                Dialog image
611              yad-dialog-label        GtkLabel                Dialog text
612              yad-calendar-widget     GtkCalendar             Calendar widget
613              yad-color-widget        GtkColorChooser         Color selection widget
614              yad-color-palette       GtkTreeView             Predefined colors list
615              yad-entry-label         GtkLabel                Entry label
616              yad-entry-widget        GtkEntry                Entry widget
617              yad-entry-spin          GtkSpinButton           Entry widget for numeric values
618              yad-entry-combo         GtkComboBox             Entry widget with combo
619              yad-entry-edit-combo    GtkComboBoxEntry        Entry widget with editable combo
620              yad-file-widget         GtkFileChooser          File selection widget
621              yad-font-widget         GtkFontChooser          Font selection widget
622              yad-form-flabel         GtkLabel                Field label in form
623              yad-form-button         GtkButton               Button field in form
624              yad-form-entry          GtkEntrfy               Entry field in form
625              yad-form-spin           GtkSpinButton           Numeric entry field in form
626              yad-form-check          GtkCheckButton          Checkbox field in form
627              yad-form-combo          GtkComboBox             Combo field in form
628              yad-form-edit-combo     GtkComboBoxEntry        Editable combo field in form
629              yad-form-file           GtkFileChooserButton    File or directory field in form
630              yad-form-font           GtkFontChooserButton    Font field in form
631
632              yad-form-color          GtkColorChooserButton   Color field in form
633              yad-form-label          GtkLabel                Label field in form
634              yad-form-separator      GtkHSeparator            Separator in form
635              yad-icons-full          GtkIconView             Icons widget for normal mode
636              yad-icons-compact       GtkTreeView             Icons widget for compact mode
637              yad-list-widget         GtkTreeView             List widget
638              yad-progress-widget     GtkProgressBar          Progressbar widget
639              yad-vscale-widget       GtkScale                Vertical scale widget
640              yad-hscale-widget       GtkScale                Horizontal scale widget
641              yad-text-widget         GtkTextView             Text info widget
642              yad-timeout-indicator   GtkProgreeBar           Timeout indicator
643
644

EXAMPLES

646       Display  a  file  selector  with the title Select a file to remove. The
647       file selected is returned on standard output.
648
649              yad  --title="Select a file to remove" --file-selection
650
651       Display a text entry dialog with the title Select  Host  and  the  text
652       Select  the  host  you  would  like  to flood-ping. The entered text is
653       returned on standard output.
654
655              yad  --title "Select Host" --entry --text "Select the  host  you
656              would like to flood-ping"
657
658       Display  a  dialog,  asking Microsoft Windows has been found! Would you
659       like to remove it?. The return code will be 0 (true in shell) if YES is
660       selected, and 1 (false) if NO is selected.
661
662              yad   --image  "dialog-question"  --title  "Alert" --button=gtk-
663              yes:0  --button=gtk-no:1  --text  "Microsoft  Windows  has  been
664              found! Would you like to remove it?"
665
666       Show  the search results in a list dialog with the title Search Results
667       and the text Finding all header files....
668
669              find . -name '*.h' | yad --list --title "Search Results"  --text
670              "Finding all header files.." --column "Files"
671
672       Show an icon in the notification area
673
674              yad --notification --image=update.png --text "System update nec‐
675              essary!" --command "xterm -e apt-get upgrade"
676
677       Display a weekly shopping list in a check list dialog with  Apples  and
678       Oranges pre selected
679
680              yad  --list  --checklist  --column  "Buy"  --column  "Item" TRUE
681              Apples TRUE Oranges FALSE Pears FALSE Toothpaste
682
683       Display a progress dialog while searching for all the postscript  files
684       in your home directory
685
686              find $HOME -name '*.ps' | yad --progress --pulsate
687
688       Display a box with all of the installed desktop applications
689
690              yad --icons --read-dir=/usr/share/applications
691
692

DEVELOPMENT

694       There are some developers features providing with YAD.
695
696       YAD  icon  browser is a graphical tool for discover icons in current or
697       user-specified GTK+ icon theme. Launch it as
698
699              yad-icon-browser [theme]
700
701       When using autoconf you may use special m4 macro AM_PATH_YAD for  look‐
702       ing for yad and check it version. Usage of this macro is
703
704              AM_PATH_YAD([MIN-VERSION],[ACT-FOUND],[ACT-NOT-FOUND])
705

AUTHOR

707       Yad was written by Victor Ananjevsky <ananasik@gmail.com>.
708
709

SEE ALSO

711       gdialog(1), dialog(1), zenity(1)
712
713
714
715                                Marth 24, 2011                          YAD(1)
Impressum