Page 1 of 2

SimpleGTK theme maker

Posted: Sun 26 Jun 2011, 13:46
by stu90
Updated to 0.7b
fixed bug with close (thanks L18L)
new info box to say which theme has been removed
added gtk button icons.

Important Updated to 0.6
L18L has fixed a big bug with theme removal. (thanks L18L)

bug: In the remove theme gui If no theme is selected and ok is clicked it moves the /usr/share/themes directory to /tmp

Updated to 0.5
Added fido / none root support (thanks L18L)
Fixed error with removing themes with white space in the name.
new version of yad-0.12.4 available here:
http://www.murga-linux.com/puppy/viewto ... 647#539647

Updated to 0.4
Added option to remove themes
Changed menu category to Desktop

Updated to 0.3
thanks L18L
#Do not loose chosen colors if Name is blank
#change blank to underscore in Name

Hello,
Here is a little Yad GUI for making simple basic GTK themes - there are no bells, whistles or fancy GTK theme effects here, i wanted to try and keep the GUI as simple to use as possible and as such there are only 5 inputs.

Note: For a more feature rich gtk theme maker check out Trio's GTK Theme Maker 1.4 here:
http://www.murga-linux.com/puppy/viewtopic.php?t=45702

Background:
Is the main theme colour, input boxes and backgrounds.

Hight light:
Is the colour when you move over a button and through menus.

Selected:
Is the colour when you drag drop select text or directories / files and select files in the file manager.

Text:
Is the colour of the text under files and the like.

Theme Name:
Is what ever you want to call your new theme.

Image

Dependencies:
Requires Yad - download is available on this link:
http://www.murga-linux.com/puppy/viewto ... 533#536533

Menu entry is in Utility
tested on lucid puppy.

Posted: Sun 26 Jun 2011, 14:09
by Geoffrey
stu90,

hey that's not bad at all, nice job, works with Quirky 1.20 NOP, 10 out 10 for simplicity and usability :wink:

Posted: Mon 27 Jun 2011, 11:21
by stu90
Geoffrey wrote:stu90,

hey that's not bad at all, nice job, works with Quirky 1.20 NOP, 10 out 10 for simplicity and usability :wink:
Hi Geoffrey,
thank you for testing 8)

Posted: Mon 27 Jun 2011, 13:02
by Geoffrey
stu90 wrote:
Geoffrey wrote:stu90,

hey that's not bad at all, nice job, works with Quirky 1.20 NOP, 10 out 10 for simplicity and usability :wink:
Hi Geoffrey,
thank you for testing 8)
Hi stu90,

I was looking at the code I couldn't see where I could make the buttons text only.
In Xdialog --buttons-style "text" is used but that command don't work, could you give me a link
to where I can view that info, I'd like to try my hand at yad.

I've also tried your google image search but it don't seem to read the screen res, most likely something different in Quirky 120 NOP

Posted: Mon 27 Jun 2011, 15:07
by stu90
Geoffrey wrote:
stu90 wrote:
Geoffrey wrote:stu90,

hey that's not bad at all, nice job, works with Quirky 1.20 NOP, 10 out 10 for simplicity and usability :wink:
Hi Geoffrey,
thank you for testing 8)
Hi stu90,

I was looking at the code I couldn't see where I could make the buttons text only.
In Xdialog --buttons-style "text" is used but that command don't work, could you give me a link
to where I can view that info, I'd like to try my hand at yad.

I've also tried your google image search but it don't seem to read the screen res, most likely something different in Quirky 120 NOP
Hi Geoffrey,

I think the google image search you refer to is by lithpr, it uses wmctrl to get the screen res - i just installed it from the ubuntu repository.

There is not to much in the way of Yad documentation - there are a few examples on the Yad site
http://code.google.com/p/yad and options list in terminal yad --help-all

I really don't know much about using yad or writing scripts, as far as i know to remove button icons you need to set custom buttons - i have attached simplegtk script below with how i use yad to set buttons.
gkt-cancel and gtk-ok would use button icons but just a button name ok and cancel would not. You can name / use the buttons for what ever you want not just limited to ok and cancel.

thanks.

Posted: Mon 27 Jun 2011, 20:34
by seaside
stu90,

Nice compact utility.
I've also tried your google image search but it don't seem to read the screen res, most likely something different in Quirky 120 NOP
You can use puppy's xwininfo like this-

Code: Select all

xwininfo -root |grep Width|cut -d: -f2
to get screen resolution.

Cheers,
s

SimpleGTK theme maker

Posted: Mon 27 Jun 2011, 21:01
by L18L
Hi stu90,

having chosen the colors and forgot to name it ?
Or gave a name including blank ?

No problem

Code: Select all

VERSION=" v 0.3 "
#Do not loose chosen colors if Name is blank
#change blank to underscore in Name
My regards

PS: next step could be changing an existing theme

Posted: Tue 28 Jun 2011, 11:06
by stu90
seaside wrote:stu90,

Nice compact utility.
I've also tried your google image search but it don't seem to read the screen res, most likely something different in Quirky 120 NOP
You can use puppy's xwininfo like this-

Code: Select all

xwininfo -root |grep Width|cut -d: -f2
to get screen resolution.

Cheers,
s
Thanks Seaside - that is handy to know. 8)

Re: SimpleGTK theme maker

Posted: Tue 28 Jun 2011, 11:10
by stu90
L18L wrote:Hi stu90,

having chosen the colors and forgot to name it ?
Or gave a name including blank ?

No problem

Code: Select all

VERSION=" v 0.3 "
#Do not loose chosen colors if Name is blank
#change blank to underscore in Name
My regards

PS: next step could be changing an existing theme
Hi L18L,
Nice update - i have used this in simpleBOX as well. :)

I originally though about editing an existing simplegtk theme but didn't go any further with it as it is so quick and easy to make new themes.

cheers.

Posted: Thu 30 Jun 2011, 02:30
by stu90
updated to 0.4 see first post for changes + download.

cheers.

SimpleGTK theme maker

Posted: Thu 30 Jun 2011, 13:34
by L18L
Hi stu90,

tested on wary512
which may run as unprivileged user fido.

Code: Select all

# root password for user fido 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} 
inserted at line 8 will let it work in all waries.

Without this the output is not true. :lol:

Code: Select all

# ./simplegtk
Exiting
mkdir: can't create directory '/usr/share/themes/wau_wau/': Permission denied
touch: cannot touch `/usr/share/themes/wau_wau/gtk-2.0/gtkrc': No such file or directory
/root/my-applications/bin/simplegtk: line 72: /usr/share/themes/wau_wau/gtk-2.0/gtkrc: No such file or directory
New wau_wau theme created
Don't know whether this is worth a new version
but anyway it is worth a note in the title

My regards

Posted: Fri 01 Jul 2011, 03:59
by Geoffrey
Hi stu90,

I just tried you new version 0.4, when I click remove I get this when run in terminal, I'm running it in quirky 120 NOP, It does create a theme ok

Code: Select all

# simplegtk
yad: symbol lookup error: yad: undefined symbol: g_malloc0_n
cancel pressed exiting
# 

Re: SimpleGTK theme maker

Posted: Fri 01 Jul 2011, 11:38
by stu90
L18L wrote:Hi stu90,

tested on wary512
which may run as unprivileged user fido.

Code: Select all

# root password for user fido 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} 
inserted at line 8 will let it work in all waries.

Without this the output is not true. :lol:

Code: Select all

# ./simplegtk
Exiting
mkdir: can't create directory '/usr/share/themes/wau_wau/': Permission denied
touch: cannot touch `/usr/share/themes/wau_wau/gtk-2.0/gtkrc': No such file or directory
/root/my-applications/bin/simplegtk: line 72: /usr/share/themes/wau_wau/gtk-2.0/gtkrc: No such file or directory
New wau_wau theme created
Don't know whether this is worth a new version
but anyway it is worth a note in the title

My regards
Hi L18L,
Thanks for the heads up - i have added this to new update.
cheers.

Posted: Fri 01 Jul 2011, 11:45
by stu90
Geoffrey wrote:Hi stu90,

I just tried you new version 0.4, when I click remove I get this when run in terminal, I'm running it in quirky 120 NOP, It does create a theme ok

Code: Select all

# simplegtk
yad: symbol lookup error: yad: undefined symbol: g_malloc0_n
cancel pressed exiting
# 
Hi Geoffrey,
Im not sure what this error means nor am i able to recreate this error at my end - i did however find a error with removing themes with white space in the name (this is now fixed in v 0.5) maybe your error is related to this?

Also which version of yad are you using - the latest version i am using is yad-0.12.4 the .pet is available here:
http://www.murga-linux.com/puppy/viewto ... 647#539647

thanks for feedback.

Posted: Fri 01 Jul 2011, 12:18
by Geoffrey
stu90,

I just downloaded v 0.5 when I run it, it say's that it is v 0.4 and still the same error when remove is clicked. :?

edit yeah using yad-0.12.4

Posted: Fri 01 Jul 2011, 12:45
by stu90
Geoffrey wrote:stu90,

I just downloaded v 0.5 when I run it, it say's that it is v 0.4 and still the same error when remove is clicked. :?

edit yeah using yad-0.12.4
oops yes it is 0.5 version but i forgot got to bump the version number :oops: (fixed now)

To be honest i don't know what to suggest regarding this error you are getting Geoffrey - i have uninstalled and reinstalled .pet and am still unable to reproduce it on lucid puppy ( i don't have any quirky or wary installs )

Maybe an idea to try compiling Yad on your quirky 120 NOP install as i compile it here on Lucid puppy
http://code.google.com/p/yad/downloads/ ... 2.4.tar.xz

Code: Select all

./configure 
 make 
 new2dir make install
If you look in the simplegtk script the part for removing themes is 3) i cant see anything there that would be causing an error?

Image

SimpleGTK theme maker

Posted: Fri 01 Jul 2011, 16:21
by L18L
Hi stu90,

thanks for version 0.5

I have played with colours and gtk buttons again...

Again, not really worth a new version....

Cheers

Posted: Sat 02 Jul 2011, 03:26
by Geoffrey
stu90 wrote: To be honest i don't know what to suggest regarding this error you are getting Geoffrey - i have uninstalled and reinstalled .pet and am still unable to reproduce it on lucid puppy ( i don't have any quirky or wary installs )

Maybe an idea to try compiling Yad on your quirky 120 NOP install as i compile it here on Lucid puppy
http://code.google.com/p/yad/downloads/ ... 2.4.tar.xz

Code: Select all

./configure 
 make 
 new2dir make install
Well I compiled it and it now works, no errors :wink:, funny thing though when I built it, it created the directory structure under /usr/local/
and I wondered why it still didn't work, I looked at your's and it was under /usr/, so I've used your's and copied over the relevant files to build a
package, my version is a lot larger yad in /usr/bin is 354.4 kB, this version of quirky is no way a stock version with loads of updates and mods,
this may account for the size difference, I'll upload a pet of it but whether it will work with other quirky's I do not know, it may only work in my 600meg hybrid monster. :lol: .

Geoffrey

Posted: Sun 03 Jul 2011, 16:33
by `f00
actually..

I prefer simplegtk - quite useful and gives expected results (highlight on tabs would be nice but once you start adding features..)

bg - great (at last relief from rox-filer window 'snow-blinding' or getting lost in too-dark gtks)

highlight - love buttons&etc that prelight on hover

select - automatically does contrasting text :D

text - if you get color/value just right, it works well with bg/highlight for medium values

;) it's almost like a return to 'classic' gtk1

works fine on my q142 (anticipate no issues on other puplets like warys)

___(see under), thank you stu'! So many times I've thought "I can fix that gtk theme" and it got pushed back (the few times I did mod a gtk theme it was a struggle getting something reasonably workable and not too ugly). Now it's simple :D

Posted: Mon 04 Jul 2011, 04:43
by stu90
`f00 wrote:actually..

I prefer simplegtk - quite useful and gives expected results (highlight on tabs would be nice but once you start adding features..)

bg - great (at last relief from rox-filer window 'snow-blinding' or getting lost in too-dark gtks)

highlight - love buttons&etc that prelight on hover

select - automatically does contrasting text :D

text - if you get color/value just right, it works well with bg/highlight for medium values

;) it's almost like a return to 'classic' gtk1

works fine on my q142 (anticipate no issues on other puplets like warys)
Hello `f00 thanks for testing and feedback.

If you mean highlight on the tabs in geany and the like this should be doable with the highlight colour with out adding an extra input (see script below)

extract and make executable - then move script to the directory /root/my-applications/bin/

cheers.