Dragonfly theme for Gtk and IceWm

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
Alienx
Posts: 141
Joined: Fri 06 May 2005, 22:02
Location: Rio de Janeiro - Brazil

Dragonfly theme for Gtk and IceWm

#1 Post by Alienx »

I loved rarsa's Dragonfly theme for JWM !!!! :D

http://www.murga.org/%7Epuppy/viewtopic.php?t=2406

so I prepared the same theme for IceWm and also a companion gtk theme for gtk1 and gtk2 and updated gtk-theme to show it on menu
Attachments
icewm-gtk-dragonfly.jpg
(108.99 KiB) Downloaded 3447 times
Sorry, broken english above :-)

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#2 Post by rarsa »

Very nice,

I like the colors and the simplicity. In IceWM I was using ElbergGreen theme to combine with the Dragonfly backdrop http://www.murga.org/%7Epuppy/viewtopic ... highlight=.

I had just finished updating the Dragonfly theme to also set the corresponding GTK theme and pinboard font color from ToughJourney's wizard. I was using the forest theme, but now I'll include yours if you don't mind.

I have a comment though. Your dotpup completelly replaces the gtk-theme script. Think about it this way: If you ever create another GTK theme, are you going to replace that file again and loose the theme you peviously added?

I suggest using sed to just insert the line you want.

I will repackage my jwm theme and there you can see the instructions to do it nicelly. i.e. Don't add it if it's already there and just add it to the existing script.

Meanwhile, I suggest adding a warning to your download post.

Thank you for the theme.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#3 Post by rarsa »

Here is the code I added to my JWM Dragonfly theme dotpup to install your GTK dragonfly theme in a non destructive way.

It does the following:
- Checks if the theme is already there (with the grep)
- If it's not there then backs up the gtk-theme and executes an awk command that inserts the required lines in the gtk-theme script.

Of course, you still need to untar the gtkrc.dragonfly to /etc/gtk.

I also recommend taring and untaring specifying /etc instead of /root/.etc, as /root/.etc is just an implementation detail that should not be exposed in scripts.

Code: Select all

# Add the GTK dragonfly theme to the gtk-theme script if it is not already there

grep "dragonfly" /usr/sbin/gtk-theme
if [ $? -ne 0 ] ; then
  cp /usr/sbin/gtk-theme /usr/sbin/gtk-theme.$$
  awk '{
    if (/\"default\" \"Default color theme\"/) 
    {
      print $0;
      print " \"dragonfly\"   \"Dragonfly\" $STATUSDRAGONFLY  \\"
    } 
    else 
    {
      if (/STATUSDEFAULT=\"off\"/) 
      {
        print $0;
        print "STATUSDRAGONFLY=\"off\" \nif [ \"$CURRENTTHEME\" = \"dragonfly\" ] ; then\n STATUSDRAGONFLY=\"on\"\nfi"
      } 
      else 
      {
        print $0
      } 
    }
  } ' /usr/sbin/gtk-theme.$$  > /usr/sbin/gtk-theme
fi

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#4 Post by BarryK »

that's really great that you guys are matching up gtk and window manager
themes!

Post Reply