Page 1 of 5
Fluxbox Themes matching GTK themes
Posted: Mon Sep 06, 2021 6:31 pm
by purplemoon
Creating / modifying FB themes to match GTK themes is not very difficult, especially since these are mostly flat themes. It mainly consists in modifying only a few elements of the FB theme, always the same ones. So I wondered if it was possible to create some kind of script that would:
- check what GTK theme is used;
- look for the required data from that GTK theme (colors, font, window border size, menu items size...);
- place this data into some kind of generic FB style script;
- and finally reload FB to apply the newly auto-generated theme.
I do not have the knowledge to try that (create a script) unfortunately, otherwise I would have given it a try, since most FB themes are outdated, as Jerry rightly mentioned in a recent video. There are not many decent ones available at the moment. I have created a couple of themes to match my config, if anyone is interested, I'd be glad to share them and to learn how to proceed.
Re: Fluxbox Themes matching GTK themes
Posted: Mon Sep 06, 2021 6:46 pm
by Jerry3904
We would love to see what you have done!
Re: Fluxbox Themes matching GTK themes
Posted: Tue Sep 07, 2021 4:29 pm
by PPC
purplemoon wrote: Mon Sep 06, 2021 6:31 pm
Creating / modifying FB themes to match GTK themes is not very difficult, especially since these are mostly flat themes. It mainly consists in modifying only a few elements of the FB theme, always the same ones. So I wondered if it was possible to create some kind of script that would:
- check what GTK theme is used;
- look for the required data from that GTK theme (colors, font, window border size, menu items size...);
- place this data into some kind of generic FB style script;
- and finally reload FB to apply the newly auto-generated theme.
I do not have the knowledge to try that (create a script) unfortunately, otherwise I would have given it a try, since most FB themes are outdated, as Jerry rightly mentioned in a recent video. There are not many decent ones available at the moment. I have created a couple of themes to match my config, if anyone is interested, I'd be glad to share them and to learn how to proceed.
Here's a tip to get you started on getting info on GTK theme (I got this from
https://github.com/KittyKatt/screenFetc ... nfetch-dev):
Code: Select all
gtk2Theme=$(grep '^gtk-theme-name' "$HOME"/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtk2Theme=${gtk2Theme//\"/}
gtkIcons=$(grep '^gtk-icon-theme-name' "$HOME"/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtkIcons=${gtkIcons//\"/}
gtkFont=$(grep 'font_name' "$HOME"/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtkFont=${gtkFont//\"/}
This varibales get you part of what you want: GTK theme name, fonts and also icons... I have no idea where you can get rest of the info you want... probably somewhere in /usr/share/themes/$gtk2Theme/gtk-2.0/ ,,, [I'm using the variables set above, to get automaticaly to the theme that you are using]
Now... getting this to a generic FB script may may achieved with echoing the text you want and the above variables...
Adapt the above code to gtk3 if needed...
I wish I had time to help you more with that, it sounds interesting...
P.
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 08, 2021 6:13 pm
by purplemoon
Jerry3904 wrote: Mon Sep 06, 2021 6:46 pm
We would love to see what you have done!
I have enclosed as an attachment a couple of Fluxbox dark themes. The 'KlassiK' series (to be completed) is a rather generic theme, not really aimed at matching exactly a specific GTK theme. They are not perfect by any means, as they are work in progress. Please, do not hesitate to test and give feedback for improvements. As for screenshots (which I had to remove from the themes), I have to figure out something as they are too big to add here.
PPC wrote: Tue Sep 07, 2021 4:29 pm
Here's a tip to get you started on getting info on GTK theme (I got this from
https://github.com/KittyKatt/screenFetc ... nfetch-dev):
Code: Select all
gtk2Theme=$(grep '^gtk-theme-name' "$HOME"/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtk2Theme=${gtk2Theme//\"/}
gtkIcons=$(grep '^gtk-icon-theme-name' "$HOME"/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtkIcons=${gtkIcons//\"/}
gtkFont=$(grep 'font_name' "$HOME"/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtkFont=${gtkFont//\"/}
This varibales get you part of what you want: GTK theme name, fonts and also icons... I have no idea where you can get rest of the info you want... probably somewhere in /usr/share/themes/$gtk2Theme/gtk-2.0/ ,,, [I'm using the variables set above, to get automaticaly to the theme that you are using]
Now... getting this to a generic FB script may may achieved with echoing the text you want and the above variables...
Adapt the above code to gtk3 if needed...
I wish I had time to help you more with that, it sounds interesting...
P.
Thank you for all this info.
I will give it a try with 'Canta' theme, but this is all new to me so... lots of learning to do there!
[Edit] This seems to require way more knowledge than I have, so, if anyone is willing to dive into this, please do so.

Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 08, 2021 6:18 pm
by purplemoon
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 08, 2021 6:26 pm
by Jerry3904
Thanks!
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 08, 2021 6:41 pm
by purplemoon
And a link to a short video (on YouTube) showcasing some screenshots for each theme:
https://youtu.be/oI7nHVftNNY
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 08, 2021 6:58 pm
by kobaian
purplemoon wrote: Wed Sep 08, 2021 6:13 pm
I have enclosed as an attachment a couple of Fluxbox dark themes. The 'KlassiK' series (to be completed) is a rather generic theme, not really aimed at matching exactly a specific GTK theme. They are not perfect by any means, as they are work in progress. Please, do not hesitate to test and give feedback for improvements. As for screenshots (which I had to remove from the themes), I have to figure out something as they are to big to add here.
This one looks good with my favorite GTK-theme - Matcha-Dark-Pueril:

Maybe the colors should be a little bit warmer...
Re: Fluxbox Themes matching GTK themes
Posted: Tue Sep 14, 2021 6:04 pm
by purplemoon
kobaian wrote: Wed Sep 08, 2021 6:58 pm
This one looks good with my favorite GTK-theme - Matcha-Dark-Pueril:
...
Maybe the colors should be a little bit warmer...
I'm glad you like it. What kind of colors are thinking about? I'm currently working on a version that should match Reversal Red theme. And I'm also thinking about doing something with the Matcha themes, as these a present by default in MX.
Also, I have just completed a theme that matches 'Canta' Gtk themes. But I cannot publish anything before I have the authorization of the original creator of the theme, since mine basically tries to reproduce the original Canta appearance.
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 15, 2021 3:50 am
by kobaian
purplemoon wrote: Tue Sep 14, 2021 6:04 pm
kobaian wrote: Wed Sep 08, 2021 6:58 pm
This one looks good with my favorite GTK-theme - Matcha-Dark-Pueril:
...
Maybe the colors should be a little bit warmer...
I'm glad you like it. What kind of colors are thinking about?
In Klassik-Lime-Dark and Klassik-Lime-Dark-Lined I would turn the color of the lime-green lines from #C5E2AC to #97BB72.
The lines will be a little bit darker and warmer and will match exactly the color from Matcha-Dark-Pueril GTK-theme. Now it looks like a similar color, but a little bit washed out.