You are not logged in.

Announcement

Due to heavy spamming of forums registration is going in stages. If you wish to register as a new user with ArchBang Forums, first register and then send an e-mail to: archbangforums at gmail dot com. It should contain the problem you want to discuss or some other AB related content. You will be promoted from registering member with no posting rights to new member with posting rights after that. If your mail is ignored you haven't fulfilled the requirements.

#1 2012-05-11 05:45:22

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Gtk3 and Openbox [Solved]

With the increasing number of apps using gtk3, we need a way to install or switch between them

Going to do some reading up over weekend, need to get File-Roller looking more like other ArchBang apps.

If anyone has any ideas then please let me know

Offline

#2 2012-05-11 06:38:22

Badener
Member
Registered: 2011-12-31
Posts: 43

Re: Gtk3 and Openbox [Solved]

U can switch by editing /home/username/.config/gtk-3.0/settings.ini.

7a2287189646981.jpg

found this thread https://bbs.archlinux.org/viewtopic.php?id=125540

Last edited by Badener (2012-05-11 07:00:07)

Offline

#3 2012-05-11 07:12:51

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 2,661
Website

Re: Gtk3 and Openbox [Solved]

Have you seen this proposal of monacelli? http://bbs.archbang.org/viewtopic.php?pid=14152#p14152 post 21


Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
Quote: What I have learnt from Linux is to minimize dependencies and functionalities for greater independence.
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#4 2012-05-11 07:22:54

mike4ca
Happy (Arch|Manjaro)[B,b]ang User
From: Iowa, USA
Registered: 2011-10-17
Posts: 434

Re: Gtk3 and Openbox [Solved]

I ran into gtk3 problems last year.  See http://bbs.archbang.org/viewtopic.php?id=1498.  Look at the last few posts.  I have not tried with a fresh install to see if lxappearance is handling things better.


Free Software Foundation member 10865

Offline

#5 2012-05-11 08:26:15

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

I simply copy the gtk-3.0 folder from the theme folder to ~/.config (~/.config/gtk-3.0/...files...)
Then change/adjust the theme with lxappearance.
May be it is not the most comfortable way if you change themes very often, but it works, and the gtk3 apps look good.


Fluent in Portuguese and Bad English

Offline

#6 2012-05-11 09:22:47

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

I am on the case, thanks so much for all the suggestions.

Remember copying config files over on my desktop, but am looking for an all in one solution for themes may have found it

Thanks

Offline

#7 2012-05-12 02:44:49

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Would this one be any good?

http://gnome-look.org/content/show.php/ … ent=147290

Trying to find one that is dark for gtk2 and gtk3

This one did not load dark [background] mostly dark grey

http://lassekongo83.deviantart.com/art/ … -203936861

Offline

#8 2012-05-12 13:31:37

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 2,661
Website

Re: Gtk3 and Openbox [Solved]

I like the second one better.


Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
Quote: What I have learnt from Linux is to minimize dependencies and functionalities for greater independence.
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#9 2012-05-12 16:56:03

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

I also like the 2nd (have it installed).
However currently I'am using the "MediterraneanNight". I think the colors used are softer to the eyes
http://gnome-look.org/content/show.php/ … ent=148398

If you prefer a dark theme the OMG is one of my 1st choices
http://gnome-look.org/content/show.php/ … ent=149294


Fluent in Portuguese and Bad English

Offline

#10 2012-05-12 17:28:21

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 2,661
Website

Re: Gtk3 and Openbox [Solved]

Both look fantastic!!


Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
Quote: What I have learnt from Linux is to minimize dependencies and functionalities for greater independence.
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#11 2012-05-12 23:09:41

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

OMG theme really is all round it includes gtk2 gtk3 and openbox theme... I will try it out and see how it looks...

Thank you darktux

Offline

#12 2012-05-13 09:24:01

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

I have had problems setting up gtk3 themes using lxappearance so did a little searching turns out themes need to be in /usr/share/themes [not a problem].

But settings.ini although set up up still does not change gtk3 theme, if I remove the file I get a different gtk3 theme [which looks slightly better]

Of course we are not running Gnome so we do not get all the bells and whistles, I could avoid gtk3 apps altogether [and would do!] but the way things are going most apps will become gtk3 the future.

Have a feeling the problem maybe lxappearace, not sure if gtk-theme-switcher will work or maybe something else.

Offline

#13 2012-05-13 09:50:09

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Mr. Green, have you copied the gtk3 theme folder to /home/username/.config/gtk-3.0 ? Then try again lxapperance.

See example bellow
http://postimage.org/image/b89yir17b/8f23f4a0

edit:source
https://bbs.archlinux.org/viewtopic.php?id=140720

Last edited by darktux (2012-05-13 10:02:21)


Fluent in Portuguese and Bad English

Offline

#14 2012-05-13 10:14:04

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

@darktux That is what I doing wrong smile, seems a bit messy to copy over each theme to gtk-3.0 each time... thanks

Seems it even works with themes in ~/.themes provided you copy over said gtk-3.0... dude feel a script coming on

https://wiki.archlinux.org/index.php/GTK%2B#GTK.2B_3.x

Should have I would find it in Arch wiki  cool

Offline

#15 2012-05-13 10:44:17

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Have tweaked code shown in arch wiki a little

find /home/${USER}/.themes -wholename "*/gtk-3.0" | sed -e "s/^\(.*\)\/gtk-3.0$/\1
/" || sed -e "s/^\(.*\)\/gtk-2.0$/\1/"

Might have to grep to find gtk3 theme then you could run

gtk3theme <foo>

To copy over theme [gtk-3.0] to .config/gtk-3.0

Just a thought...

Offline

#16 2012-05-13 10:44:39

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Welcome, and yep, not very pratical to have to copy the folder each time ... a script would be ... perfect, but (for now smile ) it is beyhond my knowledge
And yes, I have my themes in ~/.themes and it works.


Fluent in Portuguese and Bad English

Offline

#17 2012-05-13 10:54:37

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

well a script would not be too difficult provided you know theme name,

get input
find gtk-3.0 directory [in /usr/share/themes or ~/.themes]
then copy out gtk-3.0 directory to ~/.config
a few error checks job done!

Offline

#18 2012-05-13 11:07:46

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

could the theme name be provided by the current gtk2 theme ?
some thing like:

check/list gtk3/gtk2 themes
execute lxapperance
on exit lxapperance get the theme selected
execute script above

something like this in a pipe menu in ob menu would be fantastic
just an (silly?) idea

Last edited by darktux (2012-05-13 11:17:11)


Fluent in Portuguese and Bad English

Offline

#19 2012-05-13 11:15:38

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Well I have started a very simple script

Offline

#20 2012-05-13 12:20:34

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Works great!

my steps:
1st: use the "find ..." to list the gtk3 themes
2nd: use the scipt
3rd: apply theme with lxapperance


Fluent in Portuguese and Bad English

Offline

#21 2012-05-13 12:28:19

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

I've just added the "find ..." in the script and now when no theme name is provided it list the gtk3 themes

# Test if theme name given
if [ $# -ne 1 ]
then
  find /home/${USER}/.themes -wholename "*/gtk-3.0" | sed -e "s/^\(.*\)\/gtk-3.0$/\1/" || sed -e "s/^\(.*\)\/gtk-2.0$/\1/"
  echo "Usage: `basename $0` {theme name}"
  exit
fi

example output:
http://postimage.org/image/mxh4atl1j/4ec6daf8


Fluent in Portuguese and Bad English

Offline

#22 2012-05-13 12:51:37

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 2,661
Website

Re: Gtk3 and Openbox [Solved]

Nice work, guys!!


Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
Quote: What I have learnt from Linux is to minimize dependencies and functionalities for greater independence.
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#23 2012-05-13 13:27:55

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

@darktux just need to strip out path to theme, just give theme name and we are on a winner smile

Will update script to add find command

Offline

#24 2012-05-15 08:53:29

scjet
ArchBanger
From: Windsor, Canada
Registered: 2010-12-01
Posts: 790

Re: Gtk3 and Openbox [Solved]

(cd /home/${USER}/.themes && find . -name "gtk\-3\.0" -print) | sed -e "s/^\(.*\)\/gtk-3.0$/\1/" | perl -p -i -e 's/^\.\///g'

it's dirty, but it'll strip out the "/path-to-gtk3/"theme(s), but your main script isn't copying anything to ~/.config  ?

Last edited by scjet (2012-05-15 09:31:09)


The "BSD" things in life are "Free", and "Open", and so is ArchBang!
Go Leafs Go !!!

Offline

#25 2012-05-15 08:58:48

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Wow check out basename, these regular expressions give me a head ache .....

Added a '-l' to list gtk3 themes

Hope Oliver does not see my script, my bash skills make him cry smile

Offline

#26 2012-05-15 09:02:51

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Latest version

http://pastebin.com/MxcGG0sW

Now checks /usr/share/themes as well as ~/.themes

Offline

#27 2012-05-15 09:57:10

scjet
ArchBanger
From: Windsor, Canada
Registered: 2010-12-01
Posts: 790

Re: Gtk3 and Openbox [Solved]

sorry guys, but I just don't understand why you even need to copy either /usr/share/themes/*/gtk-3.0/<contents>..., Or, ~/.themes/*/gtk-3.0/<contents>...,  over to ~/.config/gtk-3.0  ???

All I did was , for exmaple, "cp -r /usr/share/themes/OMG* ~/.themes/"
then after I bring up "lxappearance" it automatically creates a ~/.config/gtk-3.0/settings.ini, ... and modifies it according to the gtk-3.0 theme I pick.

The only caveat I found was that under lxappearance -> Widget (tab option) it correctly listed "OMG-Dark" as the gtk-*  theme.
However, under the Color (tab option), it said: "Color scheme is not supported by currently selected widget theme" , and the "Use customized Color scheme" button is greyed out.  ???

if anyone can explain this I would be appeciative.
Thanks.

Last edited by scjet (2012-05-15 10:24:45)


The "BSD" things in life are "Free", and "Open", and so is ArchBang!
Go Leafs Go !!!

Offline

#28 2012-05-15 11:10:05

scjet
ArchBanger
From: Windsor, Canada
Registered: 2010-12-01
Posts: 790

Re: Gtk3 and Openbox [Solved]

... also as a quick test, I installed the "zukitwo-themes", and "zukitwo-colors" from AUR,
but this time, I did NOT copy them from /usr/share/themes/Zukitwo -> ~/.themes, or ~/.config/gtk-3.0/ ...
Then I brought up "lxappearance" and there was the ZukitwoI widget/Themes, and I was able to change/apply theme to "Zukitwo-Dark" and it automatically modified my ~/.config/gtk-3.0/settings.ini accordingly.
(Zukitwo) Also now, under the "lxappearance" -> "Color" (tab menu), the "Use customized color sheme" button is enabled again.  Strangely enough, as mentioned above, this button was instead "greyed-out" if I used any of the lxappearance -> "OMG*" theme(s)

mmm, I guess this is ok ?

- or as Bill Shakespeare once said: "... much ado about nothing..."
smile

Last edited by scjet (2012-05-15 11:20:54)


The "BSD" things in life are "Free", and "Open", and so is ArchBang!
Go Leafs Go !!!

Offline

#29 2012-05-15 11:19:25

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

scjet, have you comfirmed that the theme was applied to gtk3 apps ?
That is the issue. From my experience, without copy the gtk3 folder to ~/.config the gtk3 apps do not use the theme, only gtk2 apps

Last edited by darktux (2012-05-15 11:20:39)


Fluent in Portuguese and Bad English

Offline

#30 2012-05-15 11:24:16

scjet
ArchBanger
From: Windsor, Canada
Registered: 2010-12-01
Posts: 790

Re: Gtk3 and Openbox [Solved]

I agree, you may very well be right,  I guess we'll need a couple example gtk3 apps to test.

Last edited by scjet (2012-05-15 11:26:13)


The "BSD" things in life are "Free", and "Open", and so is ArchBang!
Go Leafs Go !!!

Offline

#31 2012-05-15 11:29:01

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Can you test with networkmanager (applet) and/or gmplayer ?

Last edited by darktux (2012-05-15 11:40:37)


Fluent in Portuguese and Bad English

Offline

#32 2012-05-15 11:41:36

scjet
ArchBanger
From: Windsor, Canada
Registered: 2010-12-01
Posts: 790

Re: Gtk3 and Openbox [Solved]

yes, the /usr/bin/gnome-mplayer icons, color, and transparency look ok.  There isn't much else to look for I guess.

also, cat /home/rick/.config/gtk-3.0/settings.ini

[Settings]
# DO NOT EDIT! This file will be overwritten by LXAppearance.
gtk-theme-name = Zukitwo-Dark
gtk-icon-theme-name = gnome-carbonate
gtk-font-name = Sans 10
gtk-cursor-theme-name = (null)
gtk-cursor-theme-size = 0
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size = GTK_ICON_SIZE_SMALL_TOOLBAR
gtk-button-images = 0
gtk-menu-images = 1
gtk-enable-event-sounds = 1
gtk-enable-input-feedback-sounds = 1
gtk-xft-antialias = 1
gtk-xft-hinting = 1
gtk-xft-hintstyle = hintslight
gtk-xft-rgba = rgb

I just hope we don't have to drag in any ubuntu-*-fonts,..., colors,... for all this gtk3 stuff to work right

Last edited by scjet (2012-05-15 11:47:39)


The "BSD" things in life are "Free", and "Open", and so is ArchBang!
Go Leafs Go !!!

Offline

#33 2012-05-15 11:56:12

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Ok, I'm not with my pc at the moment but I guess my settings.ini is something similar.
Please can you check if you have any other files/folders in ~/.config/gtk-3.0/ ? (the theme might have been copied during installation ?)
Or, do another test:
- install another GTK3 theme (ideally one very different from zukitwo, for example a dark one)
- change theme in lxappearance
- check in a GTK3 app if the theme was applied

Last edited by darktux (2012-05-15 11:57:44)


Fluent in Portuguese and Bad English

Offline

#34 2012-05-16 00:34:18

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Updated script to search both /usr/share/themes and ~/.themes

Could remove some loops and if statements by using  find

find /usr/share/themes/ -name "gtk-3.0"

I need to remove path to theme name and gtk-3.0 from results .....

Offline

#35 2012-05-16 05:50:28

oliver
Administrator
Registered: 2010-11-04
Posts: 1,544

Re: Gtk3 and Openbox [Solved]

Mr Green wrote:

I need to remove path to theme name and gtk-3.0 from results .....

Can you post the output?

You can use awk and the NF option to get the last field... i.e. find PATH -maxdepth 1 | awk -F'/' '{print $NF}'

This would return '9' from the following path: 1/2/3/4/5/6/7/8/9

or 5 from 1/2/3/4/5

but I'm not sure where gtk-3.0 needs to be removed


Hasta manana, monsieur
Were the only words that I knew for sure

Offline

#36 2012-05-16 05:59:42

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

It needs to find theme that contain gtk-3.0 directory from ....

/usr/share/themes/<foo>/gtk-3.0

Need to strip the /usr/share/themes & the gtk-3.0 to leave the theme name <foo>, thought sed would be a better option [if more complicated]

find can of course grab directories that match [gtk-3.0] but what to do after.

My over use of 'if' is me just trying to learn syntax smile

Offline

#37 2012-05-16 07:23:41

oliver
Administrator
Registered: 2010-11-04
Posts: 1,544

Re: Gtk3 and Openbox [Solved]

maybe some variation on:

echo /usr/share/themes/foo/gtk-3.0 | awk -F'/themes/' '{print $2}' | awk -F/ '{print $1}'

probably a much more graceful way to do it though :-)


Hasta manana, monsieur
Were the only words that I knew for sure

Offline

#38 2012-05-16 09:09:24

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

I used basename on a matching theme directory, need to read up on awk and sed smile

Offline

#39 2012-05-16 22:59:08

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Something like

find /usr/share/themes -name 'gtk-3.0' | awk -F'/' '{print $5}'

Searches /usr/share/themes for gtk-3.0 pipe to awk delimiter '/' instead of white space then print theme name [$5]

Thanks Oliver

Offline

#40 2012-05-17 04:14:59

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Also by adding -exec to the mix I might be able to remove the finally if statements

find /usr/share/themes/<foo> -type d -name "gtk-3.0" -exec <commands> '{}' \;

If foo is found with gtk-3.0 directory then execute <command> using find output.

Offline

#41 2012-05-17 10:08:06

scjet
ArchBanger
From: Windsor, Canada
Registered: 2010-12-01
Posts: 790

Re: Gtk3 and Openbox [Solved]

Good job again all  !
smile


The "BSD" things in life are "Free", and "Open", and so is ArchBang!
Go Leafs Go !!!

Offline

#42 2012-05-17 15:12:50

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

It's great!
Mr Green, since after the script we still have to execute lxappearance to apply the theme, might be a good idea to, after the sript is completed, to launch lxappeareance.

I tried addind

echo "Launching Lxappearance ..."
sleep 1
lxappearance

in the script and it worked. Not sure if is the best way


Next step: Add a menu entry in obmenu

Let me know your thoughts on this idea.


Fluent in Portuguese and Bad English

Offline

#43 2012-05-18 00:50:04

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Could add an extra option?

Not had that much feedback on if script works or not regarding changing gtk3 theme, for me I can switch themes with ease now. Plus as an added bonus cleaned up /usr/share/themes and ~/.themes as well....

Tweaking theme will still have to be done with lxappearance

Offline

#44 2012-05-18 13:37:15

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Mr Green, from my experience, the script changes the gtk3 theme.
However, I always have/like to use lxappearance after gtk3 theme installed in order to tweak it and/or change gtk2 theme to match the gtk3 theme).

An extra option would be perfect.
My suggestion:

(...)
# Check if theme exists then copy it if it does
flag=0
for x in $system_theme_dir $theme_dir; do
	if [ -d ${x}/${theme_name}/gtk-3.0 ]; then
  	cp -a ${x}/${theme_name}/gtk-3.0 ${user_home}/.config
	echo
  	echo "Gtk3 theme ${theme_name} installed"
  	flag=1
	fi
done

# Option to tweak theme with lxappearance (after theme instalation) 
read -p "Tweak theme with Lxappearance ? (Y/n) " yn 
case $yn in
	[Nn]* ) exit ;;
	* ) 	lxappearance ;;
esac
(...)

Fell free to change it or simple ignore it if you thing it will be 'too much' having in mind the initial objectives of the script.

Last edited by darktux (2012-05-18 13:58:14)


Fluent in Portuguese and Bad English

Offline

#45 2012-05-18 14:00:52

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Can of course add it in

Do you still want theme not found lines left in, can make it work with your code?

Offline

#46 2012-05-18 14:09:36

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

yep, would be great!


Fluent in Portuguese and Bad English

Offline

#47 2012-05-18 23:15:40

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Can you test this and if ok will update my pastebin

#!/usr/bin/env bash

# script to copy gtk-3.0 to ~/.config/
# by Mr Green & darktux

# paths
user_home=/home/${USER}
theme_name=$1
theme_dir=${user_home}/.themes
system_theme_dir=/usr/share/themes

# Test if theme name given or list [-l]
if [ $# -ne 1 ]
then
  echo "Usage: `basename $0` {theme name} or -l to list gtk3 themes"
  exit
elif [ $1 = "-l" ]; then
  echo
  find ${system_theme_dir} ${theme_dir} -type d -name 'gtk-3.0' | awk -F'/' '{print $5}'
  echo
  exit
fi

# Check if theme exists then copy it if it does
flag=0
for x in $system_theme_dir $theme_dir; do
	if [ -d ${x}/${theme_name}/gtk-3.0 ]; then
  	cp -a ${x}/${theme_name}/gtk-3.0 ${user_home}/.config
  	echo "Gtk3 theme ${theme_name} installed"
  	flag=1
	fi
done

# Theme not found
if [ "$flag" -eq 0 ]; then
  echo "${theme_name} not found"
else
# Option to tweak theme with lxappearance (after theme instalation) 
  read -p "Tweak theme with Lxappearance ? (Y/n) " yn 
  case $yn in
    [Nn]* ) exit ;;
    * )   lxappearance ;;
  esac

fi
 
exit

Offline

#48 2012-05-19 03:08:28

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Fom my tests it is working great. If anyone else could test it would be good.
Just a litle minor sugestion: Just before the last 'fi' add the 'clear' command, to end up with a clean terminal (good for the eyes smile).


Fluent in Portuguese and Bad English

Offline

#49 2012-05-19 05:29:38

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Try this for line 42

    * )   lxappearance && clear ;;

Offline

#50 2012-05-19 07:47:18

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

Perfect !!!


Fluent in Portuguese and Bad English

Offline

#51 2012-05-19 08:48:19

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

Will add it too pastebin

Offline

#52 2012-05-19 19:07:30

monacelli
Member
Registered: 2011-11-15
Posts: 10

Re: Gtk3 and Openbox [Solved]

It's nice to see some gtk3 work being done. smile  For what it's worth, I haven't had a gtk-3.0 directory in my .config since gtk3 first came out.  I would suggest renaming it or getting rid of it and then see if you're still having problems changing themes.  Lately I've been using Greybird (Xubuntu's default theme) with custom darker window borders.  http://i.imgur.com/nARra.jpg

Offline

#53 2012-05-22 23:24:41

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

@darktux lxappearance has been updated [0.5.2] looks like there are some gtk3 fixes smile [not tested yet!]

Offline

#54 2012-05-23 01:41:50

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

I'll test it and give feedback asap.


Fluent in Portuguese and Bad English

Offline

#55 2012-05-26 15:19:17

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

From my tests lxappearance is now able to change gtk3 themes.
Just remove your ~/.config/gtk3.0 folder (or all the content with the exception of settings.ini file) and use lxappearance.


Fluent in Portuguese and Bad English

Offline

#56 2012-05-26 23:35:29

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

If I remove contents of directory [gtk-3.0] then run lxppearance, all I get is settings.ini. Theme does not change...

After running gtk3theme gtk-3.0 gets applied correctly.

Thanks for testing

Offline

#57 2012-05-27 08:03:39

darktux
Member
From: Lisbon, Portugal
Registered: 2011-11-10
Posts: 42

Re: Gtk3 and Openbox [Solved]

I can confirm that my [gtk-3.0] folder does only have the settings.ini file.
However, I can change gtk3 themes with lxappearence.

Just one detail:  While with gtk2 apps the theme is applyed "online", with gtk3 apps the theme is not applyed on running apps. It is applyed only to apps that are started after the theme has changed.

Last edited by darktux (2012-05-27 08:03:57)


Fluent in Portuguese and Bad English

Offline

#58 2012-06-18 00:52:56

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,889

Re: Gtk3 and Openbox [Solved]

A minor edit to script to allow spaces in theme names, if anyone wants updated version them let me know.

Offline

Board footer

Powered by FluxBB