Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-07-08 22:15:28

-iak-
Member
Registered: 2017-10-30
Posts: 48

Edited xfwm theme looks like the original (!)

Hi everybody, I downloaded an xfwm theme called RGaps [https://www.xfce-look.org/p/1174081/].
The author says that he uses Oomox [https://github.com/themix-project/oomox] to generate different colour schemes.
I installed it and I really like it for the things that it allows to do, but unfortunately I wasn't able to use it to edit the RGaps themes.

So I decided to manually edit the themes, editing the hexadecimal values in the .xpm files. The files look now different in the Tunar's tumbnail.
I created a new folder in /usr/share/themes, with an "xfwm" folder in it. In fact, the new theme is recognized and usable, but, weird thing, it looks exactly like the original RGaps theme.

Why is this happening?

Thanks in advance,
Andrea

Last edited by -iak- (2019-07-08 22:16:49)

Offline

#2 2019-07-08 22:44:51

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,046

Re: Edited xfwm theme looks like the original (!)

Hard to tell without seeing the changes you made, but the RGaps theme uses the GTK Color Pickup functionality of xfwm4. Basically, it will use the GTK-defined colour in place of the coded colour. My best guess is that this is what is happening. If you want  to enforce a colour, you'll need to remove the colour pickup codes. For example, title-3-active.xpm:

/* XPM */
static char * title_3_active_xpm[] = {
"1 27 2 1",
"#	c #000000 s active_color_2",
" 	c None",
" ",
" ",
" ",
" ",
" ",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#",
"#"};
/* RMG 20170401 */

...specifies "active_color_2" as the colour pickup code, and according to the xfwm4 colour conversion guide from the link above, it will use "bg[normal]" of your GTK2 theme.

To get around this, you need to edit every xpm file and remove the pickup code:

"#    c #000000 s active_color_2",

...becomes:

"#	c #000000",

EDIT: These colours can also be defined in the themerc file, but this theme looks like it only affects the titlebar labels with this file.

Last edited by ToZ (2019-07-08 22:48:19)

Offline

#3 2019-07-08 23:36:07

-iak-
Member
Registered: 2017-10-30
Posts: 48

Re: Edited xfwm theme looks like the original (!)

Thank you, ToZ.
So, the "s active_color_2" thing should let the xfwm theme use the default colour of the main theme? Is it's so, it's not happening, RGaps is always the same.

Anyway, by removing it, it works. Thanks a lot!

P.S.
Is there any trick to avoid to manually edit every single file?

Last edited by -iak- (2019-07-08 23:43:48)

Offline

#4 2019-07-08 23:39:05

-iak-
Member
Registered: 2017-10-30
Posts: 48

Re: Edited xfwm theme looks like the original (!)

I tried

find . -name '*-active*' -exec sed "s/#999999/#126d7a/g" {} \;

but surprisingly it didn't affect any file

Offline

#5 2019-07-09 00:31:10

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,046

Re: Edited xfwm theme looks like the original (!)

You didn't specify inline edit "-i". Try:

find . -name '*-active*' -exec sed -i "s/#999999/#126d7a/g" {} \;

Offline

#6 2019-07-09 22:14:32

-iak-
Member
Registered: 2017-10-30
Posts: 48

Re: Edited xfwm theme looks like the original (!)

Yes, it works, thank you very much!

Offline

Board footer

Powered by FluxBB