Zenity/Yad and scripts

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
stu90

#31 Post by stu90 »

No probs lithpr - thanks for making .pet
8)

User avatar
lithpr
Posts: 86
Joined: Thu 10 Mar 2011, 06:33

#32 Post by lithpr »

hi all. Finally got around to messing with yad.. it's awesome. So fun and easy to use (at least for the simple case). Here's my first experiment: a little script to help find wallpapers at the users current screen resolution:

Code: Select all

#!/bin/bash
dataline=$(wmctrl -d | grep '*')
width=$(echo "$dataline" | cut -d ' ' -f 5 | cut -d \x -f 1)
height=$(echo "$dataline" | cut -d ' ' -f 5 | cut -d \x -f 2)
search=$(yad \
  --title="Find Wallpapers" \
  --text="This will help you find wallpapers that fit well within your current screen resolution.\n" \
  --window-icon=/usr/share/pixmaps/google-chrome.png \
  --entry --entry-label="Wallpaper Search:")

search=$(echo "$search" | sed "s/ /%20/g")
searchURL="http://images.google.com/images?q=imagesize%3A${width}x${height}+${search}"
defaultbrowser "$searchURL"
I'l definitelyl be messing with it more in the coming weeks.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#33 Post by Iguleder »

Another PET, this time of 0.12.1 :)

Clean install, no extras or patches.
Attachments
yad-0.12.1.pet
(67.89 KiB) Downloaded 1216 times
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Yad icon browser

#34 Post by vovchik »

Dear lguleder,

Thanks for the new yad pet. I also compiled it (in lucid) and included in my ./configure the option to create the little yad-icon-browser (18k). Here it is. I think it is useful if you are designing gtkdialog/yad/zenity/gtkdialog-splash scripts and want to see what icons you have available that are part of the system.

With kind regards,
vovchik

PS. It installs a menu entry in System.
Attachments
yad-icon-browser-0.12.1.pet
(7.93 KiB) Downloaded 1226 times
yad-icon-browser.jpg
(43.82 KiB) Downloaded 5017 times

stu90

#35 Post by stu90 »

Iguleder wrote:Another PET, this time of 0.12.1 :)

Clean install, no extras or patches.
Thanks for .pet Iguleder 8)

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#36 Post by L18L »

Iguleder wrote:Another PET, this time of 0.12.1 :)

Clean install, no extras or patches.
latest is 0.12.2 now

stu90

#37 Post by stu90 »

Yad .pet for 0.12.2 compiled on Lucid puppy - nothing stripped out.
Attachments
yad-0.12.2-i486.pet
yad-0.12.2-i486.pet
(70.63 KiB) Downloaded 1371 times

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#38 Post by sc0ttman »

as far as I know, as mentioned before, all puppies seem to say GTK 2.10, but that is only the DEV part of it.. Correct me if I am wrong, but I have 2.10 listed from pkconfig, but am using 2.12.1

I tried to compile Yad on 4.2 and it did say GTK was too old.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

stu90

#39 Post by stu90 »

sc0ttman wrote:as far as I know, as mentioned before, all puppies seem to say GTK 2.10, but that is only the DEV part of it.. Correct me if I am wrong, but I have 2.10 listed from pkconfig, but am using 2.12.1

I tried to compile Yad on 4.2 and it did say GTK was too old.
Hi sc0ttman,

Does it still compile when you get this message?
I can't recall if i get this message or not as i just bash enter all the way through with out reading the display :lol:

Any idea of what the GTK package would be called? looking though the packages downloaded in woof for squeeze puppy there is a gtk2-engines-pixbuf_2.20.1-2_i386.deb

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

yad

#40 Post by L18L »

stu90 wrote:Yad .pet for 0.12.2 compiled on Lucid puppy - nothing stripped out.
Thanks for compiling.

Here is a code snippet to control required version

Code: Select all

# test of yad version
 yad_version_min_required="0.12.1"
 yad_version=`yad --version`
 yad_version1="`yad --version | cut -d '.' -f 1`"
 yad_version2="`yad --version | cut -d '.' -f 2`"
 yad_version3="`yad --version | cut -d '.' -f 3`"
 #echo $yad_version3
 #echo $yad_version_min_required | cut -d '.' -f 3
 if    [ "$yad_version1" -lt "`echo $yad_version_min_required | cut -d '.' -f 1`" ]; then ver_err=1
 elif [ "$yad_version2" -lt "`echo $yad_version_min_required | cut -d '.' -f 2`" ]; then ver_err=1
 elif [ "$yad_version3" -lt "`echo $yad_version_min_required | cut -d '.' -f 3`" ]; then ver_err=1
 fi
 [ "$ver_err" = "1" ] && printf "your yad version %s is less than the required version %s \n" $yad_version $yad_version_min_required && exit
# /test of yad version
Note, [ "$ver_err" = "1" ] && ......... && exit is ONE line.
Tested succesfully simulating a higher yad_version_min_required

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#41 Post by seaside »

I think technosaurus made a pet for Gtk216 (which apparently works with fewer problems than 218 in Puppy).

However, the pet seems to have been lost when one of the housing sites went down.

Anyone seen this one somewhere?

Cheers,
s

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#42 Post by sc0ttman »

stu90 wrote:
sc0ttman wrote:as far as I know, as mentioned before, all puppies seem to say GTK 2.10, but that is only the DEV part of it.. Correct me if I am wrong, but I have 2.10 listed from pkconfig, but am using 2.12.1

I tried to compile Yad on 4.2 and it did say GTK was too old.
Hi sc0ttman,

Does it still compile when you get this message?
I can't recall if i get this message or not as i just bash enter all the way through with out reading the display :lol:

Any idea of what the GTK package would be called? looking though the packages downloaded in woof for squeeze puppy there is a gtk2-engines-pixbuf_2.20.1-2_i386.deb
No it does not compile.

And the package would be the DEV package of GTK - something like gtk+-2.12.1-i486-w5.pet (i made that from memory, may be wrong)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

Yad 0.9.1

#43 Post by sc0ttman »

Here is Yad 0.9.1

The 0.9.x series is the last to work in puppy 4, as far as I know.

it should work in puppy 4 and later, alhtough I am not sure..
Maybe only my mongrel install.. For testing only, I guess...

EDIT... NOPE, this one won't run pur-gui, but it runs the icon browser..
Attachments
yad-0.9.1-1-i486-pup4.pet
should work in most pups
(63.25 KiB) Downloaded 1067 times
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

stu90

#44 Post by stu90 »

update for yad-0.12.4
compiled on lucid puppy
Attachments
yad-0.12.4-i486.pet
yad-0.12.4.pet
(51.21 KiB) Downloaded 1343 times

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#45 Post by Geoffrey »

stu90,

Here it is, my monster yad compiled on quirky 1.20, I don't know how it will work with other quirky's as it was compile on my hybrid, let me know if it is ok , if not I will kill the beast. :lol:
Attachments
yad_quirky_1.20-0.12.4-i486.pet
yad compiled on quirky 1.20 may not work with stock quirky
(185.49 KiB) Downloaded 1071 times

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#46 Post by 8-bit »

If you think the zenity project is dead, check this out.
It shows the last update as April 5, 2011.

It is version 3.0.

But there is a catch. It actually requires gtk+-3.0 for compiling

It requirements as listed are:

scrollkeeper
· intltool
· gtk+-2.0
· libglade-2.0
· libgnomecanvas-2.0

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

yad international

#47 Post by L18L »

On my wary513 (German language pack) everything is fine. See
ymount
rodin.s has reported same (OK) for Russian and Ukrainian.

Is it just Dutch that does not localize or any other language except German and Russian :?:

We can reduce the problem to one simple test:

If you have a LANG other than English please report fault or success by simply testing:

Code: Select all

yad
Cancel button should show in your language if you have installed the language pack.

Thanks for your attention.
L

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#48 Post by technosaurus »

added a newer version (0.13.0+) in initial post with some fixes from svn

package size is significantly smaller
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

yad-0.13.0+

#49 Post by L18L »

technosaurus wrote:added a newer version (0.13.0+) in initial post with some fixes from svn

package size is significantly smaller
Relative links no more possible.

I have used them in ymount

example
# ymount
/bin/ymount: line 40: ../usr/local/ymount/functions: No such file or directory

Changing from
. ../usr/local/ymount/functions # enables start from anywhere
to
. /usr/local/ymount/functions

Was that intended?
If so, no problem I will update ymount using the changes

L

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#50 Post by technosaurus »

probably not intended, I will try a recompile at 0.13.0 when I return tuesday
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply