SimpleGTK theme maker

Miscellaneous tools
Message
Author
stu90

SimpleGTK theme maker

#1 Post 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.
Attachments
simpleGTK-0.7b.pet
version 0.7b
(2.1 KiB) Downloaded 978 times
simpleGTK-0.6.pet
version 0.6
(1.96 KiB) Downloaded 857 times
simpleGTK-0.5.pet
version 0.5 (fixed version number)
(1.85 KiB) Downloaded 777 times
simpleGTK-0.4.pet
version 0.4
(1.79 KiB) Downloaded 810 times
simpleGTK-0.3.pet
version 0.3
(1.6 KiB) Downloaded 800 times
simpleGTK-0.1.pet
version 0.1
(1.21 KiB) Downloaded 780 times
Last edited by stu90 on Fri 08 Jul 2011, 11:14, edited 8 times in total.

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

#2 Post 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:

stu90

#3 Post 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)

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

#4 Post 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

stu90

#5 Post 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.
Attachments
simplegtk.gz
simplegtk (no button icons) extract and make executable.
(792 Bytes) Downloaded 760 times

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

#6 Post 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

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

SimpleGTK theme maker

#7 Post 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
Attachments
simplegtk.gz
version 3
(1.19 KiB) Downloaded 768 times
simplegtk.png
just my colours for testing
(6.99 KiB) Downloaded 2481 times

stu90

#8 Post 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)

stu90

Re: SimpleGTK theme maker

#9 Post 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.

stu90

#10 Post by stu90 »

updated to 0.4 see first post for changes + download.

cheers.

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

SimpleGTK theme maker

#11 Post 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

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

#12 Post 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
# 

stu90

Re: SimpleGTK theme maker

#13 Post 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.

stu90

#14 Post 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.

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

#15 Post 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

stu90

#16 Post 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

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

SimpleGTK theme maker

#17 Post 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
Attachments
simplegtk.gz
5a
(1.39 KiB) Downloaded 519 times
simplegtk-0.5a.png
some colours in text
(5.45 KiB) Downloaded 1045 times

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

#18 Post 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

User avatar
`f00
Posts: 807
Joined: Thu 06 Nov 2008, 19:13
Location: the Western Reserve

#19 Post 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
Last edited by `f00 on Mon 04 Jul 2011, 05:38, edited 1 time in total.

stu90

#20 Post 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.
Attachments
simplegtk.gz
version 0.5a (tab highlight)
(1.32 KiB) Downloaded 552 times

Post Reply