You are not logged in.
Pages: 1
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
U can switch by editing /home/username/.config/gtk-3.0/settings.ini.
found this thread https://bbs.archlinux.org/viewtopic.php?id=125540
Last edited by Badener (2012-05-11 07:00:07)
Offline
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
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
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
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
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
Offline
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
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
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
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
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
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
@darktux That is what I doing wrong
, 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 ![]()
Offline
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
Welcome, and yep, not very pratical to have to copy the folder each time ... a script would be ... perfect, but (for now
) it is beyhond my knowledge
And yes, I have my themes in ~/.themes and it works.
Fluent in Portuguese and Bad English
Offline
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
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 abovesomething 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
Well I have started a very simple script
Offline
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
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
fiexample output:
http://postimage.org/image/mxh4atl1j/4ec6daf8
Fluent in Portuguese and Bad English
Offline
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
@darktux just need to strip out path to theme, just give theme name and we are on a winner ![]()
Will update script to add find command
Offline
(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
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 ![]()
Offline
Offline
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
... 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..."![]()
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
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
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
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
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 = rgbI 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
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
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
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
It needs to find theme that contain gtk-3.0 directory from ....
/usr/share/themes/<foo>/gtk-3.0Need 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 ![]()
Offline
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
I used basename on a matching theme directory, need to read up on awk and sed ![]()
Offline
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
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
Good job again all !![]()
The "BSD" things in life are "Free", and "Open", and so is ArchBang!
Go Leafs Go !!!
Offline
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
lxappearancein 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
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
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
Can of course add it in
Do you still want theme not found lines left in, can make it work with your code?
Offline
yep, would be great!
Fluent in Portuguese and Bad English
Offline
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
exitOffline
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
).
Fluent in Portuguese and Bad English
Offline
Try this for line 42
* ) lxappearance && clear ;;Offline
Perfect !!!
Fluent in Portuguese and Bad English
Offline
Offline
It's nice to see some gtk3 work being done.
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
@darktux lxappearance has been updated [0.5.2] looks like there are some gtk3 fixes
[not tested yet!]
Offline
I'll test it and give feedback asap.
Fluent in Portuguese and Bad English
Offline
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
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
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
A minor edit to script to allow spaces in theme names, if anyone wants updated version them let me know.
Offline
Pages: 1