ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Non-Windows Software

Yad - Yet Another Dialog

(1/2) > >>

Edvard:
So, I've used this for quite some time now, and even squawked about it here and there, but I think it deserves a proper Webfind post.  

Display graphical dialogs from shell scripts or command line.
Yad (yet another dialog) is a fork of Zenity with many improvements, such as custom buttons, additional dialogs, pop-up menu in notification icon and more.

--- End quote ---

https://code.google.com/p/yad/



Downloads here: http://sourceforge.net/projects/yad-dialog/
Code for above example from the Wiki:

--- ---yad --title='Desktop entry editor' --text='Simple desktop entry editor' --form --field='Type:CB' --field='Name' --field='Generic name' --field='Comment' --field='Command:FL' --field='Icon' --field='In terminal:CHK' --field='Startup notify:CHK' 'Application!URI' 'Name' 'Generic name' 'This is the comment' '/usr/bin/yad' 'yad' FALSE TRUE
The Google code site has a lot of example code and a Wiki, whereas the Sourceforge site mainly hosts downloads.

It really is more than just a fork of Zenity, as it has enough flexibility to build basic to moderately-complex dialog-based GUIs for many common command-line functions.  Most of the instructions are pretty intuitive, with a few things here and there that don't seem consistent ('--rest' to read arguments from a text file?) and prepare yourself for a little pain if you need to make something requiring a tray icon...
Other than that, it's truly great.  My applause to Ananasik (Yad lead coder) and all those who have contributed.
 :greenclp:

from an Internet search for "Zenity alternative" or maybe "Autohotkey Linux", I don't remember

ewemoa:
Found the following post mentioning yad and others at SO:

  http://stackoverflow.com/a/21408784


FWIW, did find a few examples at sf (may be they're the same as what's at Google code -- looks like they're moving from there):

  http://sourceforge.net/p/yad-dialog/wiki/Examples/

Edvard:
Found the following post mentioning yad and others at SO:
  http://stackoverflow.com/a/21408784
-ewemoa (May 03, 2014, 12:36 AM)
--- End quote ---

I tried all those mentioned (except KDialog), and Yad was the best of all of them.  To be fair, they're all just graphical notifications, not meant to be full GUIs.  Yad is designed to be more flexible, so by nature it can be used as a GUI construction tool (as long as all you need is a dialog to pass some parameters to command-line tools).

FWIW, did find a few examples at sf (may be they're the same as what's at Google code -- looks like they're moving from there):
  http://sourceforge.net/p/yad-dialog/wiki/Examples/

--- End quote ---

Hmmm... Yes, it looks like the same content as at the Google Code site.  
Caveat Emptor: I've found most of the examples need a little massaging to work as intended, so keep your Bash skills honed, and the Yad man page handy.

ewemoa:
Thanks for the warning -- the second example didn't work out of the box for me.


I liked the following examples from the man page:

Display a progress dialog while searching for all the postscript files in your home directory

  find $HOME -name '*.ps' | yad --progress --pulsate

--- End quote ---

Display a box with all of the installed desktop applications

  yad --icons --read-dir=/usr/share/applications

--- End quote ---

Edvard:
Thanks for the warning -- the second example didn't work out of the box for me.
-ewemoa (May 03, 2014, 05:15 AM)
--- End quote ---

The run dialog?  Check out the tweaks I posted about that:
http://sourceforge.net/p/yad-dialog/wiki/Examples/?limit=25&page=2#7516

Navigation

[0] Message Index

[#] Next page

Go to full version