Openbox Theme from GTK theme [beta]

Something like this surely exists, here is my version..
Creates an Openbox Theme from your chosen GTK Theme ... ..in 1), 2), 3)...
1) you need to launch your theme changing from a script like this (instead of calling your GTK switcher directly)
#!/bin/bash
# call your gtk theme switcher and as it quits create a matching openbox theme
# command for gtk theme switcher
lxappearance
# path to auto openbox theme generator script
~/bin/auto-openbox-theme
# launch obconf (so you can select the newly made theme)
obconf
exit
2) For that to work you also need this next script in ~/bin/auto-openbox-theme and made executable
#!/bin/bash
# Looks for the current GTK theme and automatically creates a matching Openbox theme
# The script fails on themes not following the Clearlooks convention..
# ..future improvements will account for this - for now the script politely fails on such themes.
# function used to see if script is generating empty results from GTK it can't handle yet
function emptycheck {
if [ -s $myfile ]
then
echo "$myfile has data."
else
echo "$myfile is empty."
xmessage "Sorry this gtk is not handled yet. You should not select the generated Openbox Theme this time."
exit
fi
# main script #
# copy ~/.gtkrc-2.0 to a new file and remove all data except theme name line (!d = don't delete)
sed /gtk-theme-name/!d ~/.gtkrc-2.0 > ~/.gtk-match-openbox-info
# remove string before gtk theme name and return info to this file (-i)
sed -i s/gtk-theme-name=// ~/.gtk-match-openbox-info
# strip off all (/g) speach marks (\") and return info to this file (-i)
sed -i s/\"//g ~/.gtk-match-openbox-info
# place the theme name in a variable
mygtktheme=$(cat ~/.gtk-match-openbox-info)
# copy file called mygtktheme to a new file
sed /gtk_color_scheme/!d ~/.themes/"$mygtktheme"/gtk-2.0/gtkrc > ~/.gtk-match-openbox-info
# strip the line down to just colours
sed -i s/gtk_color_scheme\ =\ \"// ~/.gtk-match-openbox-info
sed -i s/gtk-color-scheme\ =\ \"// ~/.gtk-match-openbox-info
sed -i s/fg_color\:#// ~/.gtk-match-openbox-info
sed -i s/bg_color\:#// ~/.gtk-match-openbox-info
sed -i s/base_color\:#// ~/.gtk-match-openbox-info
sed -i s/text_color\:#// ~/.gtk-match-openbox-info
sed -i s/selected_bg_color\:#// ~/.gtk-match-openbox-info
sed -i s/selected_fg_color\:#// ~/.gtk-match-openbox-info
sed -i s/tooltip_bg_color\:#// ~/.gtk-match-openbox-info
sed -i s/tooltip_fg_color\:#// ~/.gtk-match-openbox-info
sed -i s/\"//g ~/.gtk-match-openbox-info
# force \n to be a true line break so colours on individual lines
sed -i s/\n/\\n/g ~/.gtk-match-openbox-info
sed -i 's/\\//g' ~/.gtk-match-openbox-info
# store some colours for use in Openbox theme
# don't delete (!d) line number n and place it in a text file colournX
# where X is used later to aid production of Openbox theme
sed '1!d' ~/.gtk-match-openbox-info > /tmp/colour1V
sed '2!d' ~/.gtk-match-openbox-info > /tmp/colour2W
sed '3!d' ~/.gtk-match-openbox-info > /tmp/colour3X
sed '4!d' ~/.gtk-match-openbox-info > /tmp/colour4Y
sed '5!d' ~/.gtk-match-openbox-info > /tmp/colour5Z
# check if we have empty data from unhandled GTK themes
myfile="/tmp/colour1V"
emptycheck
myfile="/tmp/colour2W"
emptycheck
myfile="/tmp/colour3X"
emptycheck
myfile="/tmp/colour4Y"
emptycheck
myfile="/tmp/colour5Z"
emptycheck
# hold the above in varibles
myV=$(cat /tmp/colour1V)
myW=$(cat /tmp/colour2W)
myX=$(cat /tmp/colour3X)
myY=$(cat /tmp/colour4Y)
myZ=$(cat /tmp/colour5Z)
# make Openbox theme by replacing VWXYZ in template with colours
sed s/VVVVVV/$myV/g ~/.themes/obthemetemplate/openbox-3/TEMPLATE > /tmp/obtheme
sed -i s/WWWWWW/$myW/g /tmp/obtheme
sed -i s/XXXXXX/$myX/g /tmp/obtheme
sed -i s/YYYYYY/$myY/g /tmp/obtheme
sed s/ZZZZZZ/$myZ/g /tmp/obtheme > ~/.themes/obthemetemplate/openbox-3/themerc
# update rc.xml
#urxvt -e /usr/bin/obconf
3) AND you need this folder in your ~/.themes/ folder - download it, extract and copy to ~/.themes
4) (optional but welcome) Post your fails, post your abusive and constructive criticism, and post your "hey why don't you use this 5million times better version here?"'s
thanks, bye

Works fine here. Thanks for the script, it's quite handy and I got at last a nice OB theme witch fits with the murrina chrome gtk theme

Similar Messages

  • Openbox Themes in gtk-theme-switch

    I've got a little problem with gtk-theme-switch, both Openbox, and gtk-theme-switch expect their respective themes to be in ~/.themes, obconf can tell the difference, and doesn't show those that won't work, gtk-theme-switch, however, shows all my Openbox themes, which it won't work with.
    I would be really grateful if someone could provide me with a solution, or of necessary, an alternate program to change GTK themes in a pure Openbox environment.

    It has two commands, switch, for old GTK1.x themes, and switch2 for GTK2 themes.
    I'll try gtk-chtheme and see if it makes any difference.
    Yep, gtk-chtheme doesn't show my Openbox themes, thanks.
    Last edited by Jaejae (2008-05-24 07:54:46)

  • Paper Delusion Openbox Theme

    Download
    My first Openbox theme. Comes with Paper Delusion and the Steel Delusion variant.
    Title bar buttons are taken from Dyne by Lyrae
    Wallpaper: alabaster by ether
    Title and Menu font: AvantGarde LT Medium
    In this screenshot:
    Panel - visibility
    Clock - conky
    Run - gmrum
    Music - sonata
    Editor - gedit (I accually use vim >_>)
    Config - obconf
    Tell me what you think. ^_^

    anubis2591 wrote:
    dmz wrote:
    anubis2591 wrote:
    Thanks. ^_^
    I love Openbox and the themes that the community has made but unfortunatly there's not much innovation to be made in themes besides colour and icon use. I really hope that later versions of Openbox offer more features for customization.
    Here's your innovation: http://trapd00r.deviantart.com/gallery/
    Is that yours? Haha. Anyways I can't say I'm a fan of the scanline like style in the title bars but that's deffiently something different. Also there's some other things that they do different. I'm going to have to check out the themecfgs for them. Thanks for the linky.
    I bet I could do much more intresting things if I accually read the guide on the openbox wiki. I made this first one by just changing a base theme into this. >_>
    molom wrote:Very nice, I love minimalistic themes.
    Thanks so do I.
    And so do I.
    Yep that's mine, and I recommend you to read the theme specifications on the openbox site, there's lots of cool things to try out. Anyways, I can't wait for a new openbox version so that I can have something new to play around with.

  • Openbox theme

    how would one go about modifying an openbox theme (or gtk theme, i'm not sure) to have a colored border around the active window?
    here is an example of what i'm talking about:

    IF you also don't need window decorations like in the screenshot you must add this to rc.xml,between <applications> and </applications>,almost at the end of the config
    <application class="*">
    <decor>no</decor>
    </application>
    Also you can install obtheme from community which makes theme editing much more easier.

  • [SOLVED] Help Needed to find the name of the openbox theme

    Can anyone help me to find the name of the openbox theme ?.
    Thank you.
    It's Numix
    Last edited by bhante (2015-01-07 11:13:12)

    That looks a lot like the Numix GTK theme...

  • Can't install Openbox theme

    Hey, i have recently shifted to Arch Linux, and now i'm playing around with Openbox, which I really like.
    I have a problem installing the "Arch.blue" openbox theme from http://www.box-look.org/content/show.ph … tent=74000
    The theme is a .tar.bz2 file and I have to make it a .obt file, how to do that? (this is the newbie corner, guys )
    When I had to install some other Openbox themes I could just rename the file from .tar.gz to .obt and I could install the theme with Obconf.
    Hope you have time to assist me in this matter, thank you
    Fleet

    You don't need to make it into an .obt, you can just move it to ~/.themes, and then run 'tar -xjf' on it.

  • Openbox Theme Redirect

    Is there a file i can edit to tell openbox to look for themes in a different place than the usual
    /usr/share/themes/onyx/themerc
    also i would like to have openbox to read the theme file as themenamerc instead of just themerc  ?
    so the path to the openbox theme would be like this 
    /usr/share/themes/openbox/onyxrc
    so far all i have found is this info  http://openbox.org/wiki/Help:Themes#The … _structure. does anyone know where this file is, so i can maybe set the options. also would the main theme file section support wild carding *rc so openbox would recognise when *rc file when set manually in the rc.xml file?
    Last edited by spiritech (2014-01-23 06:18:25)

    tomk wrote:
    You might be able to achieve the desired result with symlinks. Your last question about wildcarding makes no sense, try asking it again more clearly.
    BTW, the path you identified as "the usual" is incorrect - it is /usr/share/themes/<themename>/openbox-3/themerc.
    regarding the wildcarding. form what i understand at the moment, openbox is hardcoded to read themerc files in the ./themename/openbox-3/themerc. i was going to play around and instead of having the path and file name as
    /usr/share/themes/themename/openbox-3/themerc
    i was going to split the /usr/share/themes directory into the main theme catagories
    usr/share/themes/openbox/themenamerc.ob
    usr/share/themes/gtk1|2|3/themenamerc.gtk
    usr/share/themes/icons/themedir/icondir
    i feel this would be more organised and also shorter path structure with less recursion. i know it would not work very well in practice as you stated most paths are hard coded into the applications themeselves and would mean a complete rebuild of all the packages i use. i could do something symlinks and will see how it works.
    which brings me back to the wildcarding. is i wa to use the format /usr/share/themes/openbox/themenamerc.ob i would have to code openbox to recognise the theme files with different names  *rc.ob not just themerc.
    Last edited by spiritech (2014-01-23 15:14:51)

  • Minibox, a small Openbox theme

    Minibox is a small Openbox theme. It’s blue, black, gray, and minimal. Enjoy.
    Screenshots: Busy, Fullscreen
    Download Minibox

    Actually, I think you can make custom themes, but if they're out of the size dimensions of the books Apple sells, then you can't used your custom layout for that. The custom layout/book is for if you want to do a custom layout in Aperture and then export the pages as JPGs and send them off to the printer of your choice, one who has the type (or size) of the book you want. Book printing companies should try to come on board if possible and provide third-part plug-ins for Aperture in which customers upload designs directly from the program.

  • Axonkolorish Openbox Theme

    Yeah, I based this theme off of the axonkolor visual style but it's not really a port since you can't make three color horizontal gradients in Openbox yet. Anyways the main reason I chose to make this is to do something interesting with what Openbox can do instead of flat solid everything. I think we need more innovation with our Openbox themes. It can get kind of boring otherwise. Anyways look here for downloads and notes.

    IF you also don't need window decorations like in the screenshot you must add this to rc.xml,between <applications> and </applications>,almost at the end of the config
    <application class="*">
    <decor>no</decor>
    </application>
    Also you can install obtheme from community which makes theme editing much more easier.

  • Openbox theme only changes title bar?

    Hi! Couldn't find any answer on wiki or google. I don't know if I understand this right, but I installed openbox theme, selected it in configuration but the only thing that changed is title bar, and right click menu. Programs like thunar or leafpad still have gray interface with nice >Link to theme <. I'm guessing that installing theme and selecting it isn't all to it. So what is it?

    Yes, you have to install the openbox theme to have the nice titlebar, but the gtk theme is the one that sets the "look"
    http://gnome-look.org/content/show.php/ … ent=120270
    Here is the gtk theme.

  • Openbox themes

    Hi!
    I've just installed arch and are using openbox.
    Now I'm messing around with themes to make everything look good. But there seems to be something I'm not really getting the hang of.
    I've installed this supercool theme and i love it but how can i make the programs use it to, like firefox, xterm, my filemanager and so on.
    It's kinda hard to explain what i want but if you look at the border of the window it's black with white text and i would like my firefox to look like this too. I would like the menu where File, Edit View is and whole firefox to like like my openbox theme. Is it possible to do this?
    http://img135.imageshack.us/i/pics0.png/
    -- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code --

    You need to install a matching/complementary GTK theme: https://wiki.archlinux.org/index.php/Op … appearance
    See this thread for inspiration: https://bbs.archlinux.org/viewtopic.php?id=45692

  • How do I change the subject of an inbox and outbox in order to organize them better

    I would like to change the Subject of received and sent mails in Thunderbird. I used to be able to do this with Eudora and it helped me to organize them better especially when the subject and content didn't match!

    They are designed for Thunderbird not Firefox.
    Current version of Thunderbird is 31.5.0 and they work with that version.
    Are you using a Thunderbird beta version?

  • How do I change the color of the tabs arrows at the end of the bar so I can see them better?

    How do I change the color of the tabs arrows at the end of the bar so I can see them better?
    == This happened ==
    Every time Firefox opened
    == Every time Firefox opened

    Try to find a different Firefox theme (Tools > Add-ons > Appearance/Themes):
    *Firefox 3 theme for Firefox 4: https://addons.mozilla.org/firefox/addon/firefox-3-theme-for-firefox/
    *Strata XP: https://addons.mozilla.org/firefox/addon/strata-xp/
    *Colorful Tabs: https://addons.mozilla.org/firefox/addon/1368

  • When i make a call i can hardly hear the person on the other end ,how do i turn up the volume on the phone so i can hear them better pls help

    when i make a call the person on the other end is hard to hear ,how do i turn up the volume on the phone so i can hear them better pls help

    When on a call, press the round button with the + on the side of the phone until the volume is where you want it.

  • Oh Really? Openbox Theme

    Oh Really?
    Yes really. Here's my newest Openbox theme, Oh Really. A version with a skinnier title bar is included as well as a .pypanelrc for each. Info and download here.
    So do you like it? Any suggestions? ^_^
    Edit: Sorry, I think I posted this in the wrong section. Feel free to move it. ^_^
    Last edited by anubis2591 (2008-11-30 08:56:13)

    well and which was it? please post your findings, the work does not need to be done twice
    (and i'd like to know too )
    cheers Barde

Maybe you are looking for

  • Securing a 1.5 web service using J2EE security and JDev 11g

    Hello, I'm looking for a tutorial or similar that will help me create a secure (1.5 EE with annotations) web service. I'm interested in just the development view at this point - xml file mods, etc. I did find a good resource on how to do this in 10.1

  • Create character in COPA

    How can we create character in COPA? Comapny has two warehouse in US and manufacturing in France?

  • Login codes using java database (validates with Microsoft Access File)

    hi all pro-programmer, can you show me the code to login with the username and password using java database. When the user enters the username and password in the login page then it will go to the requested page. may i know how to do it?

  • Shot in the dark - Yellow Camp iCal Actions?

    I'm wondering is anyone has the *Yellow Camp iCal Actions version 2.2* that they could make available for me to download? The developer's site seems to be dead and the only version I can find online is version 2.0. Of course, What I am looking for in

  • How to run flash games

    have lg phone with android 4.0.4 but it doesnt run flash games in firstinmath.com