Page 1 of 1
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.
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 15, 2021 6:52 pm
by purplemoon
kobaian wrote: ↑Wed Sep 15, 2021 3:50 am
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.
Thank you for the feedback! I will work on that and improve the theme. And also I'll try to work on the Matcha series.
Also, here is a link to a presentation showcasing an early preview of Canta theme for Fluxbox although I have realized that there are still some issues that I have to fix.
https://www.youtube.com/watch?v=5-71sbcaXD8
Re: Fluxbox Themes matching GTK themes
Posted: Wed Oct 06, 2021 5:47 pm
by purplemoon
I have just finished setting up 'FB-Sweet-Dark' style for Fluxbox to match the official 'Sweet' Gtk theme as much as possible.
Here are some screenshots...
sc_01.jpg
sc_02.jpg
sc_03.jpg
sc_04.jpg
.
And here is the style archive...
FB-Sweet-Dark.tar.gz
Re: Fluxbox Themes matching GTK themes
Posted: Wed Oct 06, 2021 5:55 pm
by Jerry3904
Holy purple! Thanks.
Re: Fluxbox Themes matching GTK themes
Posted: Thu Oct 07, 2021 6:42 pm
by purplemoon
Here is Fluxbox version of the original Canta GTK theme created by Vinceliuice <
https://github.com/vinceliuice/Canta-theme >.
Here is the archive...
FB-Kanta.tar.gz
And some screenshots...
canta_01.jpg
canta_02.jpg
canta_03.jpg
canta_04.jpg
I am also working on the Kanta-Light and Kanta-Dark versions...
Re: Fluxbox Themes matching GTK themes
Posted: Thu Oct 07, 2021 8:10 pm
by Jerry3904
Fun colors for sure! Best thing about Fluxbox that must keeps me interested is the fun.
Re: Fluxbox Themes matching GTK themes
Posted: Sun Oct 10, 2021 6:31 pm
by purplemoon
Jerry3904 wrote: ↑Thu Oct 07, 2021 8:10 pm
Fun colors for sure! Best thing about Fluxbox that must keeps me interested is the fun.
Sure enough, these are colorful styles

I am aware that they might be a little too colorful, but they look good on my :lipsrsealed: laptop screen that tends to display poorly some colors... Let's hope someone enjoys using these kinds of styles.
By the way, what default style(s) (GTK & icons) are going to be used in MX21?
To complete this 'Canta' clone series, here are the light and dark versions for Fluxbox.
FB-Kanta-Light.tar.gz
FB-Kanta-Dark.tar.gz
And the corresponding screenshots...
sc_fb-kanta-dark.png
sc_fb-kanta-light.png
Re: Fluxbox Themes matching GTK themes
Posted: Sun Oct 10, 2021 6:34 pm
by Jerry3904
mx-comfort style, Papirus icons
Re: Fluxbox Themes matching GTK themes
Posted: Sun Oct 10, 2021 6:42 pm
by purplemoon
Jerry3904 wrote: ↑Sun Oct 10, 2021 6:34 pm
mx-comfort style, Papirus icons
Thank you.
Once I get a hand on these, I will try to work on that 
Re: Fluxbox Themes matching GTK themes
Posted: Sun Oct 10, 2021 6:57 pm
by Jerry3904
The RC has them
Re: Fluxbox Themes matching GTK themes
Posted: Tue Oct 12, 2021 6:27 pm
by purplemoon
Jerry3904 wrote: ↑Sun Oct 10, 2021 6:57 pm
The RC has them
I discovered that theme earlier while watching LexChen Linux review of the RC. Nice distraction-free global theme, perfect for an environment dedicated to working. And a good integration with FB, the dock and Tint2.
Re: Fluxbox Themes matching GTK themes
Posted: Fri Oct 22, 2021 6:31 pm
by purplemoon
As Matcha themes are included by default into MX, I made a last set of themes for now.
So here are Matcha-Blue and Matcha-dark-blue for Fluxbox...
And here are some screenshots...

I would have liked to share these themes and a few corresponding screenshots, but that seems to impossible atm...

Re: Fluxbox Themes matching GTK themes
Posted: Fri Oct 22, 2021 6:40 pm
by richb
purplemoon wrote: ↑Fri Oct 22, 2021 6:31 pm
As Matcha themes are included by default into MX, I made a last set of themes for now.
So here are Matcha-Blue and Matcha-dark-blue for Fluxbox...
And here are some screenshots...

I would have liked to share these themes and a few corresponding screenshots, but that seems to impossible atm...
What seems to be the problem?
Re: Fluxbox Themes matching GTK themes
Posted: Fri Oct 22, 2021 10:54 pm
by purplemoon
richb wrote: ↑Fri Oct 22, 2021 6:40 pm
purplemoon wrote: ↑Fri Oct 22, 2021 6:31 pm
As Matcha themes are included by default into MX, I made a last set of themes for now.
So here are Matcha-Blue and Matcha-dark-blue for Fluxbox...
And here are some screenshots...

I would have liked to share these themes and a few corresponding screenshots, but that seems to impossible atm...
What seems to be the problem?
When I drag and drop the archives / screenshots (within the size limitations) into the message box, they are listed into the attachment tab underneath, but without the option to place these attachments inline, the size is correct but the status is blank. When I typed the previous message (the one you quoted) under status, there was a triangular icon similar to

(but not in this message now). Clicking on it opened a message from which I understood I had reached some kind of upload limit or something - can't remember exactly. And when I try to preview the message, the attachment(s) is/are gone.
Re: Fluxbox Themes matching GTK themes
Posted: Sat Oct 23, 2021 3:22 am
by Eadwine Rose
You can host them as well, elsewhere, however keep in mind the forum rules on remote-linked image sizes when you do that.
@richb, any idea what might be going on here?
Re: Fluxbox Themes matching GTK themes
Posted: Sat Oct 23, 2021 4:50 am
by purplemoon
Eadwine Rose wrote: ↑Sat Oct 23, 2021 3:22 am
You can host them as well, elsewhere, however keep in mind the forum rules on remote-linked image sizes when you do that.
That was the last set of FB themes anyway as this thread does not seem to attract much interest for whatever reason. That was just an attempt to contribute - in a way - as I can't code or anything - I guess I'm not that good at creating themes either
I guess the proper way to host these themes, in the end, is at 'box-look.org'. I'll link to these when / if I manage to do that. Thank you for your time.
Re: Fluxbox Themes matching GTK themes
Posted: Sat Oct 23, 2021 5:06 am
by asqwerth
Although I don't use fb at all,I'm sure this thread (and the screenshots thread) is helpful for FB users who want modern looking FB themes that match current gtk themes.
All the contributors to this endeavour (you, Melber, ceeslans, kobaian come to mind but I'm sure there are a few more) are much appreciated.
Re: Fluxbox Themes matching GTK themes
Posted: Sat Oct 23, 2021 5:14 am
by Melber
@purplemoon
I'm interested, fiddling around with fluxbox and tint2 is pretty much all I do with my mx laptop.
Haven't got around to checking out your styles yet, been kind of busy with other stuff recently.
At least keep posting screenshots with hosting links of what you're up to.
Re: Fluxbox Themes matching GTK themes
Posted: Thu Oct 28, 2021 6:22 pm
by purplemoon
@asqwerth &
@Melber
Thanks a lot for your support.
I will slow down on theme releases though, because... well real life, you know...
Matcha-Azul theme for Fluxbox screenshots are available on YouTube at <
https://www.youtube.com/watch?v=54a9TggHjIQ >.
Same for Canta themes: <
https://www.youtube.com/watch?v=5-71sbcaXD8 >.
There is also a - rather lengthy - video displaying Marcha-dark-blue theme and some unnecessary complex Fluxbox setup (LXpanel, Rofi, Compton...) on YouTube at <
https://www.youtube.com/watch?v=ISpbeI11PYI >.
As for the archive... They are here:
FB-Matcha-Azul.tar.gz
FB-Matcha-Dark-Azul.tar.gz
Thanks to the admins for solving the issue.
Re: Fluxbox Themes matching GTK themes
Posted: Tue Nov 09, 2021 5:35 pm
by purplemoon
Breeze-Noir-Dark for Fluxbox is (almost) ready. It is based on the original (Plasma) theme and icon set by l4k1 (
https://www.pling.com/u/l4k1/).
Here is the archive...
w_Breeze-Noir-Dark.tar.gz
And some screenshots...
sc_breeze-noir-dark_01.jpg
sc_breeze-noir-dark_02.jpg
Please, enjoy

Re: Fluxbox Themes matching GTK themes
Posted: Tue Nov 09, 2021 5:51 pm
by Jerry3904
Nice progress!
Re: Fluxbox Themes matching GTK themes
Posted: Sat Nov 20, 2021 5:41 pm
by purplemoon
Jerry3904 wrote: ↑Tue Nov 09, 2021 5:51 pm
Nice progress!
Thanks a lot Jerry!

But there is always some room for improvement...
... so while working on my winter theme I ended up with this...
FB-Fluent.tar.gz
[updated 2021-12-11 v0.1 --> v0.2a --> match GTK3 menus; changed toolbar color ]
It is still a work in progress though. The tiling buttons should be added to the 'init' file in order to be displayed on the titlebar. 'Fluent-grey' GTK theme and 'Reversal-grey-dark' icons are used as a starting point (details in the 'README' file).
It would be nice to have some feedback (on this theme and the previous ones) in order to point issues that I am not aware of.
Here are some [updated 2021-12-11] screenshots anyway (note: this is still MX-FB 19).
sc_fluent_02.jpg
sc_fluent_04.jpg
Sidenote: I have become aware that re-using the original theme names may raise some issues, so, I am considering renaming some of them.
Re: Fluxbox Themes matching GTK themes
Posted: Thu Nov 25, 2021 4:35 pm
by purplemoon
I have just become aware that there was now an open thread in this forum (
viewtopic.php?t=67090), by Melber, that is dealing with a tool to modify Fluxbox themes. So, let's consider that matching Gtk themes with Fluxbox themes is (about to be) solved.

Re: Fluxbox Themes matching GTK themes
Posted: Sun Nov 28, 2021 6:51 pm
by Melber
Hi @purplemoon,
I had a look at the styles, great work, they look really polished. Your windows decorations (close, maximze,minimze buttons) are cool, especially the "pressed button" animation details. How do you make the pixmaps, create the image in gimp and export as xpm?
Like the name says, the recolour tool allows basic colour adjustments to the MX-comfort style. A complete tool allowing a level of refinement like in your styles is still a lot of fiddling away
Re: Fluxbox Themes matching GTK themes
Posted: Thu Dec 02, 2021 5:44 pm
by purplemoon
Hello @Melber ,
Yes, you guessed right. I use Gimp to create the images. I try to make these look as much as possible like in the original themes, and then attempt to add some 'bling' :) while trying to make do with the limitations of Fluxbox.
As for your MX-comfort Recolour Tool, reading through the dedicated thread, I can see it has become a huge thing. As I am only using MX19 on a live usb for now I haven't tested it yet, waiting for MX21 Fluxbox edition. Hence the following: does the .cfg script have to follow a specific pattern? Would transparent backgrounds for the buttons do the trick to allow the modification of the window title color? If so, it maybe be worth testing this with one of the 'KlassiK' styles which I have to modify/improve anyway. Or is it specific to MX style only?
Also, while working on Rofi themes, I wondered if you have ever thought about making a similar tool for modifying Rofi color themes. For simple ones, I guess the process would be similar to that with Fluxbox themes?
Re: Fluxbox Themes matching GTK themes
Posted: Sat Dec 11, 2021 5:31 pm
by purplemoon
If anyone is interested, here is FB-Fluent matching theme for Rofi...
--> [EDIT] NEW VERSION updated 2021-12-15. <--
Code: Select all
/**
* ROFI Color theme
*/
* {
//
// FLUENT style
//
// Colors
bg-inpt: #2c2c2c; // inputbar background
fg-inpt: #ffffff; // inputbar text
bg-win: rgb(44, 44, 44, 0.6); // window background
fg-nor: #777777; // text normal unselected
bg-mbox: #ffffff; // main box background
bg-sel: #e9e9e9; // item selected background
fg-sel: #2c2c2c; // text normal selected
background-color: @bg-win;
font: "Noto Sans Mono CJK KR Regular 12";
//
border: 0;
margin: 0;
padding: 0;
spacing: 0;
}
window {
location: center;
anchor: center;
// width: 40%;
fullscreen: true;
padding: 20% 25%;
}
mainbox {
background-color: @bg-mbox;
children: [ inputbar, message, listview ];
}
inputbar {
children: [prompt, entry];
}
prompt {
background-color: @bg-inpt;
enabled: true;
padding: 12 0 0 12;
text-color: @fg-inpt;
}
entry {
background-color: @bg-inpt;
padding: 12;
text-color: @fg-inpt;
}
listview {
background-color: @bg-mbox;
columns: 1;
lines: 10;
}
element {
padding: 12;
text-color: @fg-nor;
background-color: @bg-mbox;
}
element.selected {
background-color: @bg-sel;
text-color: @fg-sel;
}
element.text {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
}
element.icon {
size: 30;
}
Re: Fluxbox Themes matching GTK themes
Posted: Sat Dec 11, 2021 6:12 pm
by Jerry3904
I'm interested! Thanks for posting it, I'll give it a whirl tomorrow.
Re: Fluxbox Themes matching GTK themes
Posted: Mon Dec 13, 2021 5:13 pm
by Melber
Hi purplemoon,
When I started I was just looking at a way to adjust MX-comfort, so the tool replaces specific lines in the theme.cfg file and rewrites colour definitions directly in the pixmaps. I’m guessing it could be rejigged to allow editing of colours in other styles. I’ve also thought about creating a generic style maker starting from a base style with selection of colours, gradients, borders etc. (all the stuff in the config file) and choice of window deco from a set of predefined pixmaps. Something to look at once I’ve finished fiddling around with the original…
The tool works in MX19, you just need the MX-comfort and MX-comfort-dark styles. Let me know if you want them.
Re: Fluxbox Themes matching GTK themes
Posted: Sat Mar 26, 2022 8:10 pm
by purplemoon
@Jerry3904
These Fluent themes are really simple themes (on purpose) and fit quite well with the 'Dualum' tint2 theme in MX21. The new version for Rofi is mostly aimed at smaller screens.
@Melber
Thanks a lot. I now have MX21 on a usb stick, so I'll give it a try. As for your MX-comfort Recolour Tool, have you thought about doing something similar for Rofi?
Even if winter is over, I thought I'd share my winter theme, although it is quite basic - I now try to follow the KISS principle whenever possible. It is aimed at laptops small screens, but not only. Back in the days, there existed a similar theme in Kodi. It looks better with ShadeZ-Dark or Simply-Circles-Dark GTK themes and Simply_Circles white icons. FB toolbar (if at the top) is set to auto-hide.
sc_09.jpg
So, here is the archive...
FB-BnW.tar.gz
... Rofi theme...
Code: Select all
/**
* ROFI Color theme
*/
* {
//
// BnW (BLACK & WHITE) style
//
// Colors
bg-inpt: #1c1c1c; // inputbar background
fg-inpt: #ebebeb; // inputbar text
bg-win: #1c1c1c; // window background
fg-nor: #ebebeb; // text normal unselected
bg-sel: #ebebeb; // item selected background
fg-sel: #1c1c1c; // text normal selected
background-color: @bg-win;
font: "Noto Sans Mono CJK KR Regular 12";
//
border: 0;
margin: 0;
padding: 0;
spacing: 0;
}
window {
location: center;
anchor: center;
width: 40%;
}
element {
padding: 12;
text-color: @fg-nor;
}
element selected {
background-color: @bg-sel;
text-color: @fg-sel;
}
element-text {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
}
element-icon {
size: 30;
}
entry {
background-color: @bg-inpt;
padding: 12;
text-color: @fg-inpt;
}
inputbar {
children: [prompt, entry];
}
listview {
background-color: @bg-win;
columns: 1;
lines: 10;
}
mainbox {
background-color: @bg-win;
children: [ inputbar, message, listview ];
}
prompt {
background-color: @bg-inpt;
enabled: true;
padding: 12 0 0 12;
text-color: @fg-inpt;
}
... and Conky script.
Code: Select all
conky.config = {
background = true,
own_window = true,
own_window_class = 'Conky',
own_window_colour = '000000',
own_window_transparent = false,
own_window_type = 'desktop',
own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 0,
double_buffer = true,
no_buffers = true,
use_spacer = 'none',
use_xft = true,
xftalpha = 1,
font = 'Monospace:size=11',
update_interval = 1,
uppercase = false,
override_utf8_locale = true,
stippled_borders = 1,
border_width = 5,
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = true,
show_graph_scale = true,
show_graph_range = true,
alignment = 'top_middle',
gap_x = 0,
gap_y = 0,
minimum_height = 25,
minimum_width = 1900,
maximum_width = 1920,
net_avg_samples = 1,
cpu_avg_samples = 6,
short_units = true,
pad_percents = 2,
text_buffer_size = 2048,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
color0 = 'ffffff', --white
color1 = 'aqua',
color2 = 'ffcc00', --light orange
color3 = 'red',
color4 = 'green',
color5 = 'blue',
color6 = '000000', --black
color7 = 'grey',
}
conky.text = [[
${goto 40}${voffset 2}${font Noto Sans CJK KR:Bold:size=11}${desktop_name}${voffset -0}\
# test audacious
${if_running audacious}\
${goto 140}${voffset -0}${font FontAwesome:size=12} ${voffset -8}${voffset 3}${font Noto Sans CJK KR:size=11}${scroll 120 ${audacious_title 160}}\
${endif}
${goto 1020}${voffset -29}${font Ubuntu:Regular:size=10}\
${color1}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Bold:size=10} ${battery_short}${color7}\
${goto 1100}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${cpu cpu1}%\
${goto 1160}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${cpu cpu2}%\
${goto 1220}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${memperc}%\
${goto 1280}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${swapperc}%\
${goto 1340}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${fs_used_perc /}%\
${goto 1400}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${fs_used_perc /home}%\
${goto 1470}${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${downspeedf enp2s0}KiB ${font FontAwesome:size=12}${voffset -1}${font Ubuntu:Regular:size=10} ${upspeedf enp2s0}KiB\
${goto 1020}${voffset 10}${color1}${battery_bar 3, 70}${color7}\
${goto 1100}${cpubar cpu1 3, 50}\
${goto 1160}${cpubar cpu2 3, 50}\
${goto 1220}${membar 3,50}\
${goto 1280}${swapbar 3,50}\
${goto 1340}${fs_bar 3,50 /}\
${goto 1400}${fs_bar 3,50 /home}${goto 1460}${color}\
${alignr}${voffset -11}${font FontAwesome:size=14} ${font Ubuntu:Regular:size=11}${time %A %d %B} ${voffset -2}${font FontAwesome:size=14} ${font Ubuntu:Regular:size=12}${voffset 0}${time %H}:${time %M}${font}${voffset -6}\
#${endif}
]]
As for the other versions of FB matcha, someone seems to have created the full set already. They are available at box-look.org.
Re: Fluxbox Themes matching GTK themes
Posted: Mon Mar 28, 2022 12:51 pm
by Melber
Hi @purplemoon, good to see you're still around.
I've been concentrating my efforts on getting the comfort recolour tool working properly. Getting closer...
I haven't really thought about rofi till now because I don't really use it myself. Why don't you have a try? The worst thing that can happen is that it doesn't work. Just make sure you back up your rofi themes first, I've managed to kill my fluxbox styles folder several times...
Re: Fluxbox Themes matching GTK themes
Posted: Mon Apr 04, 2022 5:59 pm
by purplemoon
Hi
@Melber. I see that your tool is nearly complete, congratulations!
I have been busy with 'real life' all this time and did not play around with FB. As for customizing Rofi (which I use with both Fluxbox and Awesome WM), I started working on a script in Python a few months ago, but as I am (re)learning from ZERO, it probably just looks like a joke to anyone who can code. So far it can fetch data from FB current style and prepare data to be written into a Rofi custom style file...

I need to find time to learn - way - more and make it work as intended. So....
Re: Fluxbox Themes matching GTK themes
Posted: Sat May 28, 2022 2:47 pm
by orcrist
purplemoon wrote: ↑Sat Nov 20, 2021 5:41 pm
Jerry3904 wrote: ↑Tue Nov 09, 2021 5:51 pm
Nice progress!
Thanks a lot Jerry!

But there is always some room for improvement...
... so while working on my winter theme I ended up with this...
FB-Fluent.tar.gz
[updated 2021-12-11 v0.1 --> v0.2a --> match GTK3 menus; changed toolbar color ]
It is still a work in progress though. The tiling buttons should be added to the 'init' file in order to be displayed on the titlebar. 'Fluent-grey' GTK theme and 'Reversal-grey-dark' icons are used as a starting point (details in the 'README' file).
It would be nice to have some feedback (on this theme and the previous ones) in order to point issues that I am not aware of.
Here are some [updated 2021-12-11] screenshots anyway (note: this is still MX-FB 19).
sc_fluent_02.jpgsc_fluent_04.jpg
Sidenote: I have become aware that re-using the original theme names may raise some issues, so, I am considering renaming some of them.
Wonderful theme
@purplemoon, thank you very much. Nice matching rofi theme too.
Re: Fluxbox Themes matching GTK themes
Posted: Tue Sep 06, 2022 4:51 am
by purplemoon
@orcrist Thank you! However, some improvements are needed. I will try to make time to review / update themes.
Here are FB-Arc-Blackest and FB-Flat-Remix-Red-Darkest updated:
FB-Arc-Blackest.tar.gz
FB-Flat-Remix-Red-Darkest.tar.gz
A screenshot featuring Fluxbox default panel and FBpanel:
sc_fb-arc-blackest.jpeg
And if anyone is interested, the matching Rofi themes
rofi_themes.tar.gz
If you want to see more, these are displayed here:
https://www.youtube.com/watch?v=m0hwdUgjwlA
and here:
https://www.youtube.com/watch?v=UFD_VAKQxD4
Re: Fluxbox Themes matching GTK themes
Posted: Tue Sep 06, 2022 6:03 am
by Jerry3904
Looking good!
Now that we have released
MX-Look it is much easier for users to save and re-use and a certain "look" (selected theme elements) in MX Fluxbox.
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 14, 2022 7:54 pm
by purplemoon
@Jerry3904 I have watched your video and will try it soon to change to an autumn theme...
In the meantime, I am working on a script for changing colors to match the current gtk theme (only Rofi for now). It is a very dirty code as I am learning on the way, but it works. The idea (for now) is to use a Rofi theme template [fb_BnW.rasi] and create a new theme [gtk_default.rasi] that is already selected in the rofi theme selector. It does not work with all gtk themes, but should be ok with the default selection on the iso.
Here is the test template to copy into ~/.config/rofi/themes
Code: Select all
/**
* ROFI Color theme
*/
* {
//
// BnW (BLACK & WHITE) style
//
// Colors
bg-inpt: #1c1c1c; // inputbar background
fg-inpt: #ebebeb; // inputbar text
bg-win: #1c1c1c; // window background
fg-nor: #ebebeb; // text normal unselected
bg-sel: #ebebeb; // item selected background
fg-sel: #1c1c1c; // text normal selected
background-color: @bg-win;
font: "Noto Sans Mono CJK KR Regular 12";
//
border: 0;
margin: 0;
padding: 0;
spacing: 0;
}
window {
location: center;
anchor: center;
width: 40%;
}
element {
padding: 12;
text-color: @fg-nor;
}
element selected {
background-color: @bg-sel;
text-color: @fg-sel;
}
element-text {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
}
element-icon {
size: 30;
}
entry {
background-color: @bg-inpt;
padding: 12;
text-color: @fg-inpt;
}
inputbar {
children: [prompt, entry];
}
listview {
background-color: @bg-win;
columns: 1;
lines: 10;
}
mainbox {
background-color: @bg-win;
children: [ inputbar, message, listview ];
}
prompt {
background-color: @bg-inpt;
enabled: true;
padding: 12 0 0 12;
text-color: @fg-inpt;
}
And the very dirty script:
Code: Select all
import os
import sys
from tkinter import *
import time
from os.path import exists
from os.path import expanduser
from pathlib import Path
import shutil
import subprocess
# Variables
home = ""
gtk_style_name = ""
gtk_style_name_path = ""
# Identify user name / home
def find_home_user():
global home
home = expanduser("~")
print(home)
# Identify current gtk theme name in ~/.config/gtk-3.0/settings.ini
def find_curr_gtk_style_name():
global gtk_style_name_path
global gtk_style_name
gtk_style_name_path = os.path.join(home, ".config/gtk-3.0/settings.ini")
#print(gtk_style_name_path+"eee")
if os.path.exists(gtk_style_name_path):
print("File located at: " + gtk_style_name_path)
try:
ofi = open(gtk_style_name_path, "r")
t=0
while t != "":
t = ofi.readline()
#if "gtk-theme-name" in t:
#print("line located")
#break
if "gtk-theme-name" in t:
cut = t.find("=") + 1
gtk_style_name = t[cut:-1]
print("Current GTK theme in use: " + gtk_style_name)
break
ofi.close()
except FileNotFoundError:
print("File not found :(")
else:
print("File not found")
# Locate current GTK theme in /usr/share/themes OR /home/[user]/.themes
def locate_curr_gtk_file ():
global gtk_style_path_1
global gtk_style_path_2
global curr_gtk_style_path
gtk_style_path_1 = home + "/.themes/" + gtk_style_name + "/gtk-2.0/gtkrc"
# gtk_style_path_1 = os.path.join(home, "/.themes/", gtk_style_name, "/gtk-2.0/gtkrc")
gtk_style_path_2 = "/usr/share/themes/" + gtk_style_name + "/gtk-2.0/gtkrc"
# gtk_style_path_1 = os.path.join("/usr/share/themes/", gtk_style_name, "/gtk-2.0/gtkrc")
if os.path.exists(gtk_style_path_2):
print("File located at:")
curr_gtk_style_path = gtk_style_path_2
print(curr_gtk_style_path)
elif os.path.exists(gtk_style_path_1):
print("File located at:")
curr_gtk_style_path = gtk_style_path_1
print(curr_gtk_style_path)
else:
print("File not found")
# retrieve data (colors) from gtk file
def get_gtk_colors():
global col_item
global col_lst
col_item = ""
col_lst = []
d = 0
with open(curr_gtk_style_path, "r") as ofi:
while d != "":
# for lines in curr_gtk_style_path:
d = ofi.readline()
if "gtk-color-scheme" in d:
beg = d.find("\"")
md = d.find("\\")
beg = beg+1
if "\\" in d:
md_b = md +2
#print(beg)
#print(md)
print(d[beg:md])
col_item = d[beg:md]
col_lst.append(col_item)
print(d[md_b:-2])
col_item = d[md_b:-2]
col_lst.append(col_item)
else:
#print(beg)
#print(d[beg:-2])
col_item = d[beg:-2]
col_lst.append(col_item)
print(col_lst)
####### added stuff from test_004.py
col_dict = {}
cpt = 0
gtk_col_dict = {}
# parse gtk data
def parse():
global col_lst
global gtk_col_dict
for item in col_lst:
# print(item)
cut = item.find(":")
cut2 = cut+1
# print(item[:cut] +" --> "+ item[cut2:])
gtk_col_dict.update({item[:cut]: item[cut2:]})
#parse()
print(gtk_col_dict.keys())
print("done!")
# open Rofi theme path
# Identify rofi theme template & rofi default gtk theme
def locate_rofi_themes():
home = expanduser("~")
# rofi_th_src = ""
# rofi_th_dest = ""
print(home)
global rofi_th_src
global rofi_th_dest
rofi_th_src = home + "/" + ".config/rofi/themes/fb_BnW.rasi"
rofi_th_dest = home + "/" + ".config/rofi/themes/gtk_default.rasi"
print(rofi_th_src)
print(rofi_th_dest)
locate_rofi_themes()
def copy_to_default(source, destination):
global rofi_th_src
global rofi_th_dest
# with open(rofi_th_src, "r") as ofi:
# line = "1"
# while line != "":
# line = ofi.readline()
# print(line)
fs = open(rofi_th_src, "r")
fd = open(rofi_th_dest, "w")
while 1:
line = fs.readline()
if line == "":
break
if "bg-inpt: " in line:
if "wm_color" in gtk_col_dict:
line = "bg-inpt: " + gtk_col_dict["wm_color"]+ ";\n"
elif "titlebar_bg_color" in gtk_col_dict:
line = "bg-inpt: " + gtk_col_dict["titlebar_bg_color"]+ ";\n"
elif "menubar_bg" in gtk_col_dict:
line = "bg-inpt: " + gtk_col_dict["menubar_bg"]+ ";\n"
if "fg-inpt: " in line:
if "wm_color" in gtk_col_dict:
line = "fg-inpt: " + gtk_col_dict["wm_color"]+ ";\n"
elif "titlebar_fg_color" in gtk_col_dict:
line = "fg-inpt: " + gtk_col_dict["titlebar_fg_color"]+ ";\n"
elif "menubar_fg" in gtk_col_dict:
line = "fg-inpt: " + gtk_col_dict["menubar_fg"]+ ";\n"
#if "fg-inpt: " in line:
# line = "fg-inpt: " + gtk_col_dict["fg_color"]+ ";\n"
if "bg-win: " in line:
line = "bg-win: " + gtk_col_dict["bg_color"]+ ";\n"
if "fg-nor: " in line:
line = "fg-nor: " + gtk_col_dict["fg_color"]+ ";\n"
if "bg-sel: " in line:
line = "bg-sel: " + gtk_col_dict["selected_bg_color"]+ ";\n"
if "fg-sel: " in line:
line = "fg-sel: " + gtk_col_dict["selected_fg_color"]+ ";\n"
fd.write(line)
fs.close()
fd.close()
return
#copy_to_default(rofi_th_src, rofi_th_dest)
#print("Rofi theme updated to current gtk theme!")
# Here we go!!!
find_home_user()
find_curr_gtk_style_name()
locate_curr_gtk_file()
get_gtk_colors()
parse()
copy_to_default(rofi_th_src, rofi_th_dest)
print("Rofi theme updated to current gtk theme!")
print(gtk_col_dict)
####################
#print(col_lst)
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 14, 2022 9:33 pm
by Jerry3904
That's an exciting project--I look forward to seeing where it goes! I use Rofi more and more these days.
You may know that
@Melber and I (mostly Melber) are finishing the first release of "
MX Rofi manager," and it would be great to eventually fold your code into it when you got it working as you like. If interested, you can see the current state of that project here:
https://github.com/jerry3904/mxfb-accessories
Re: Fluxbox Themes matching GTK themes
Posted: Thu Sep 15, 2022 2:24 am
by Melber
@purplemoon
Just a heads up, the latest update to rofi v 1.7.1 breaks the restore function for rofi in mxfb-look. The other mxfb-look functions should still work. Will try and fix asap
Re: Fluxbox Themes matching GTK themes
Posted: Wed Sep 21, 2022 10:23 pm
by Outlander
I modified Clearlooks-Overcast GTK theme and Finetti Fluxbox theme to make a matching set of themes. I can upload them if anyone wants em.

Re: Fluxbox Themes matching GTK themes
Posted: Tue Oct 29, 2024 7:32 pm
by purplemoon
@Jerry3904 &
@Melber I thought I had already answered your posts. But, obviously, not really. So, what else can I say but

...
Anyway, after an eternity, I rewrote a script to extract gtk colors from the theme description and load them into a dictionary that is also saved to a file. From there the data can be used for whatever purpose (theme Dunst, Rofi, Fluxbox or desktop widgets...). I am aware that this is not really useful now that Melber has created his powerful tool, but... why not.
So, here is the script that should be run in a terminal for now. It should work with most GTK themes (with GTK2 description). It is split in 2 for (hopefully) later use in a gui.
Code: Select all
import os.path
from configparser import ConfigParser
from os.path import exists
from os.path import expanduser
#from sys_color_theme import *
# EXTRACT GTK THEME COLORS TO A DICTIONARY!
# Get current GTK theme name
print("=" * 43)
print("= Saving GTK theme colors to a dictionary =")
print("=" * 43, "\n")
def get_theme_name():
global path_to_theme
global gtk_theme_name
# Locate "~/.config/gtk-3.0/settings.ini"
home = expanduser("~")
#print(home)
file_path = "~/.config/gtk-3.0/settings.ini"
full_file_path = os.path.expanduser(file_path)
# check if the path is correct
isFile = os.path.isfile(full_file_path)
if isFile :
print("Path to 'Settings.ini':\n\t", full_file_path, "\n")
# get the gtk theme name from "settings.ini" file
parser = ConfigParser()
parser.read(full_file_path)
gtk_theme_name = parser.get("Settings", "gtk-theme-name")
########## test other INSTALLED themes ########
#gtk_theme_name = "Canta"
##gtk_theme_name = "Mint-L-Aqua"
#gtk_theme_name = "Sweet-Dark-v40"
#gtk_theme_name = "Flat-Remix-GTK-Blue-Darkest"
#gtk_theme_name = "Simply_Circles_Blue_Dark"
###############################################
print("GTK theme in use:\n\t", gtk_theme_name, "\n")
# locate gtk2 theme config file either in:
# "/usr/share/themes/FULL_THEME_NAME/gtk-2.0/gtkrc"
# or in:
# "~/.themes/FULL_THEME_NAME/gtk-2.0/gtkrc"
gtk_theme_path_1 = "/usr/share/themes/" + gtk_theme_name + "/gtk-2.0/gtkrc"
gtk_theme_path_2 = home + "/.themes/" + gtk_theme_name + "/gtk-2.0/gtkrc"
if os.path.exists(gtk_theme_path_1):
path_to_theme = gtk_theme_path_1
elif os.path.exists(gtk_theme_path_2) :
path_to_theme = gtk_theme_path_2
else:
print("The file does not exist.")
print("Theme file location: \n\t", path_to_theme, "\n")
else:
print("Error. The file does not exist.")
# Retrieve the theme colors from the 'grkrc' file.
# Create a dictionary with these and store it
# into a file (dictionary) for future use.
def extract_theme_colors():
dict_sys_theme = {}
print("List of colors:")
# start creating a dictionary into a file
# theme name as a comment
th_dict_init = "# " + gtk_theme_name + "\n" + "dict_sys_theme = "
# dictionary name / header
with open("sys_color_theme.py", "w") as dest_file:
dest_file.write(th_dict_init)
# listing all the colors as key/value pairs
with open(path_to_theme, "r") as infile:
for line in infile:
# locate the lines with color data
if line.startswith("gtk-color-scheme"):
# gtk colors description varies.
backspace_nb = line.count("\\n")
# colors may be listed on one line each...
if backspace_nb == 0:
# modify data to fit dictionary format
line_corr = line.strip("gtk-color-scheme = ").strip().replace(" ", "").strip('"')
print("\t", line_corr)
x = line_corr.split(":")
x_key = x[0]
x_value = x[1]
dict_sys_theme.update({x_key: x_value})
# colors may be listed by pairs on several lines...
elif backspace_nb == 1:
# modify data to fit dictionary format before updating dictionary
line_corr_1 = line.strip("gtk-color-scheme = ").strip().strip('"')
# now isolate color items in a list
lst = line_corr_1.split("\\n")
# Isolate keys and values to populate dictionary
for item in lst:
print("\t", item)
x = item.split(":")
x_key = x[0]
x_value = x[1]
dict_sys_theme.update({x_key: x_value})
# colors may be listed on a single line...
elif backspace_nb > 1:
# modify data to fit dictionary format before writing to file
line_corr_2 = line.strip("gtk-color-scheme = ").strip().strip(" ")
line_corr_2 = line_corr_2.replace(" ", "").strip('"')
# isolate color items in a list
lst2 = line_corr_2.split("\\n")
# split each list item to create key/value pairs to populate dictionary
for item in lst2:
print("\t", item)
x = item.split(":")
x_key = x[0]
x_value = x[1]
dict_sys_theme.update({x_key: x_value})
with open("sys_color_theme.py", "a") as dest_file:
dest_file.write(str(dict_sys_theme))
print("\nCreated 'dict_sys_theme' dictionary referencing GTK2 colors\nfor'" + gtk_theme_name +"' GTK theme. Data is stored in 'sys_color_theme.py' file.\nSee details below.\n")
print("dict_sys_theme =", dict_sys_theme)
print("\nDone.")
# Let's try this!
get_theme_name()
extract_theme_colors()
If anyone is interested in trying this out and break it, any feedback welcome.
Re: Fluxbox Themes matching GTK themes
Posted: Thu Nov 07, 2024 7:06 pm
by purplemoon
Here is the corresponding script for theming Rofi. It should work for any style, as long as you modify it accordingly. It should be placed into the same directory as the previous script.
Code: Select all
import os
import os.path
from os.path import expanduser
from os.path import exists
from color_theme_default import *
#def change_rofi_theme():
# get color info from "get_gtk_colors.py",
# if system theme is in use, to update
# 'dict_sys_theme' dictionary in "color_sys_theme.py".
if app_theme == "system":
import get_gtk_colors
# clear terminal (can be enabled/disabled/(un)commented out)
#os.system('cls' if os.name == 'nt' else 'clear')
# apply new colors to theme
print("=" * 41)
print("= Applying new GTK theme colors to Rofi =")
print("=" * 41, "\n")
print(app_theme)
#print(dict_sys_theme)
# defining rofi theme template name
rofi_th_src_name = "fb_BnW.rasi"
rofi_th_dest_name = "gtk_default_test.rasi"
# setting file paths
home = expanduser("~")
rofi_th_src = home + "/.config/rofi/themes/" + rofi_th_src_name
rofi_th_dest = home + "/.config/rofi/themes/" + rofi_th_dest_name
# check if files exit
isFile_src = os.path.isfile(rofi_th_src)
isFile_dest = os.path.isfile(rofi_th_dest)
# this part is not working!!!
if not isFile_src or not isFile_dest:
if not isFile_src:
print("Template file source not found.")
# else:
# print("Found template file:", rofi_th_src)
if not isFile_dest:
print("File destination not found.")
# else:
# print("Destination file already exists and will be modified:\n\t" + rofi_th_src)
print("Cancel...\nDone.")
if isFile_src: #and isFile_dest:
print("Template file and destination file found.")
print("Template file:\n\t" + rofi_th_src)
print("Destination file already exists and will be modified:\n\t" + rofi_th_src)
print("\nCopying new data...")
fs = open(rofi_th_src, "r")
fd = open(rofi_th_dest, "w")
#for lines in fs:
while 1:
line = fs.readline()
#print(line)
if line == "":
break
else:
if "bg-inpt:" in line:
# print(line)
line = "\tbg-inpt: " + win_bg + ";\n"
print(line)
if "fg-inpt:" in line:
# print(line)
line = "\tfg-inpt: " + win_fg + ";\n"
print(line)
if "bg-win:" in line:
# print(line)
line = "\tbg-win: " + win_bg + ";\n"
print(line)
if "fg-nor:" in line:
# print(line)
line = "\tfg-nor: " + win_fg + ";\n"
print(line)
if "bg-sel:" in line:
# print(line)
line = "\tbg-sel: " + sel_bg + ";\n"
print(line)
if "fg-sel:" in line:
# print(line)
line = "\tfg-sel: " + sel_fg + ";\n"
print(line)
fd.write(line)
fs.close()
fd.close()
print("Done.")
It should be compatible with any GTK theme.
Below is an example of my Rofi minimalist theme matching Matcha Dark Aliz GTK theme and an experimental Fluxbox style - in the hope that it can be themed with a similar script in the future. For now, Fluxbox buttons are an issue...
sc_test.jpg