Fluxbox Themes matching GTK themes

Help for MX Fluxbox
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
purplemoon
Posts: 41
Joined: Fri Apr 16, 2021 6:10 pm

Fluxbox Themes matching GTK themes

#1 Post 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.

User avatar
Jerry3904
Administrator
Posts: 23059
Joined: Wed Jul 19, 2006 6:13 am

Re: Fluxbox Themes matching GTK themes

#2 Post by Jerry3904 »

We would love to see what you have done!
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

PPC
Posts: 362
Joined: Tue Sep 11, 2018 8:22 am

Re: Fluxbox Themes matching GTK themes

#3 Post 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.

purplemoon
Posts: 41
Joined: Fri Apr 16, 2021 6:10 pm

Re: Fluxbox Themes matching GTK themes

#4 Post 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. :confused:
You do not have the required permissions to view the files attached to this post.
Last edited by purplemoon on Sat Sep 25, 2021 6:42 pm, edited 2 times in total.


User avatar
Jerry3904
Administrator
Posts: 23059
Joined: Wed Jul 19, 2006 6:13 am

Re: Fluxbox Themes matching GTK themes

#6 Post by Jerry3904 »

Thanks!
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

purplemoon
Posts: 41
Joined: Fri Apr 16, 2021 6:10 pm

Re: Fluxbox Themes matching GTK themes

#7 Post by purplemoon »

And a link to a short video (on YouTube) showcasing some screenshots for each theme: https://youtu.be/oI7nHVftNNY
Last edited by purplemoon on Tue Sep 14, 2021 6:09 pm, edited 1 time in total.

User avatar
kobaian
Posts: 365
Joined: Fri Jan 03, 2020 5:49 am

Re: Fluxbox Themes matching GTK themes

#8 Post 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:

Image


Maybe the colors should be a little bit warmer...
Desktop PC: Intel Core i5-4670K, Gigabyte H81M-S2PV, 16GB RAM, NVIDIA Quadro K2000. Laptop: MacBook Late 2008, Core2Duo 2.0GHz, 8GB RAM. Netbook: Asus EEEPC Intel Atom 1.6GHz, 2GB RAM. System: MX23 64bit/32bit Fluxbox.

purplemoon
Posts: 41
Joined: Fri Apr 16, 2021 6:10 pm

Re: Fluxbox Themes matching GTK themes

#9 Post 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.

User avatar
kobaian
Posts: 365
Joined: Fri Jan 03, 2020 5:49 am

Re: Fluxbox Themes matching GTK themes

#10 Post 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.
Desktop PC: Intel Core i5-4670K, Gigabyte H81M-S2PV, 16GB RAM, NVIDIA Quadro K2000. Laptop: MacBook Late 2008, Core2Duo 2.0GHz, 8GB RAM. Netbook: Asus EEEPC Intel Atom 1.6GHz, 2GB RAM. System: MX23 64bit/32bit Fluxbox.

Post Reply

Return to “MX Fluxbox Official Release”