Page 1 of 1

Changing border color of window

Posted: Fri Dec 10, 2021 3:45 am
by SpongeBOB
Hi everyone,

How can we change the border color of the window ? (here blue)
Image
MX-21


Thanks

Re: Changing border color of window

Posted: Fri Dec 10, 2021 5:03 am
by Huckleberry Finn
You need to play with css files. First take a copy of the original one (even the directory) :

/usr/share/themes/mx-comfort-dark/gtk-3.0/dist/gtk-dark.css

(also /usr/share/themes/mx-comfort-dark/gtk-3.0/dist/gtk.css )

search for this (color code) :

Code: Select all

0f56d9
Probably this line (#89) is the related one:

Code: Select all

@define-color wm_border_focused #0f56d9;
____________________

You can do this: Copy the whole directory and rename, change the name to yours (say: to Bob or MX-Sponge :D) in

/usr/share/themes/mx-comfort-dark/index.theme

and play with it, do all experiments there. It'll appear with that name in settings :)


You can also (even better) first create a .themes directory in home, than put/create "your" theme there, and make all experiments freely :)

Re: Changing border color of window

Posted: Fri Dec 10, 2021 8:12 am
by SpongeBOB
Thank you @Huckleberry Finn
I have made the changes but unfortunately it's not working
LS -d mx-com* of /usr/share/themes wrote: drwxr-xr-x 11 root root 4.0K Oct 18 23:48 mx-comfort
drwxr-xr-x 10 root root 4.0K Oct 18 23:48 mx-comfort-dark
drwxr-xr-x 10 root root 4.0K Dec 10 13:44 mx-comfort-dark-BOB
drwxr-xr-x 3 root root 4.0K Oct 18 23:48 mx-comfort-dark-thick-border
drwxr-xr-x 3 root root 4.0K Oct 18 23:48 mx-comfort-thick-border
index.theme of dark-bob wrote: [Desktop Entry]
Type=X-GNOME-Metatheme
Name=mx-comfort-dark-BOB
Comment=
Encoding=UTF-8

[X-GNOME-Metatheme]
Name=mx-comfort-dark-BOB
GtkTheme=mx-comfort-dark-BOB
IconTheme=mx-comfort-dark
MetacityTheme=mx-comfort-dark-BOB
And I changed the color of the css variable wm_border_focused in
/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0/gtk.css
/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0/gtk-dark.css

Code: Select all

89	@define-color wm_border_focused #fff000;
But the border still remain blue.. any ideas ?

Bob

Re: Changing border color of window

Posted: Fri Dec 10, 2021 10:22 am
by Huckleberry Finn
After saving changes just select another theme from Appearance, then re-select that (to take effect).

If still not: Same lines (same files) in the original (non-dark) folder:

/usr/share/themes/mx-comfort/gtk-3.0/dist/...

Re: Changing border color of window

Posted: Fri Dec 10, 2021 10:27 am
by Huckleberry Finn
SpongeBOB wrote: Fri Dec 10, 2021 8:12 am
And I changed the color of the css variable wm_border_focused in
/usr/share/themes/mx-comfort-dark-CS/gtk-3.0/gtk.css
/usr/share/themes/mx-comfort-dark-CS/gtk-3.0/gtk-dark.css

...

But the border still remain blue.. any ideas ?

Bob
:confused:

/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0/dist/gtk.css

Re: Changing border color of window  [Solved]

Posted: Fri Dec 10, 2021 10:30 am
by dolphin_oracle
you can't *just* change those files anyway. the standard mx-comfort files are compiled to reduce memory consumption. so you need to update the resource files after modifying the css.

I *think* this i the command

Code: Select all

glib-compile-resources gtk.resource.xml
executed from the gtk3.0 folder of the theme.

Re: Changing border color of window

Posted: Sat Dec 11, 2021 2:13 am
by SpongeBOB
Huckleberry Finn wrote: Fri Dec 10, 2021 10:27 am
SpongeBOB wrote: Fri Dec 10, 2021 8:12 am /usr/share/themes/mx-comfort-dark-CS/gtk-3.0/gtk.css
/usr/share/themes/mx-comfort-dark-CS/gtk-3.0/gtk-dark.css
:confused:
/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0/dist/gtk.css
@Huckleberry Finn sorry it was from another test, but the directory is indeed mx-comfort-dark-BOB

Re: Changing border color of window

Posted: Sat Dec 11, 2021 2:38 am
by SpongeBOB
dolphin_oracle wrote: Fri Dec 10, 2021 10:30 am ...
I *think* this i the command

Code: Select all

glib-compile-resources gtk.resource.xml
executed from the gtk3.0 folder of the theme.
Thank you @dolphin_oracle .

Unfortunately I got a problem when I try to dw the libglib2 ->
CLI wrote: root@MX21b:/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0# glib-compile-resources gtk.gresource.xml
Command 'glib-compile-resources' not found, but can be installed with:
apt install libglib2.0-dev-bin

root@MX21b:/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0# apt install libglib2.0-dev-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libglib2.0-dev-bin
E: Couldn't find any package by glob 'libglib2.0-dev-bin'



Moderator: color removed, please stick to regular color fonts, thank you.

Re: Changing border color of window

Posted: Sat Dec 11, 2021 5:30 am
by Huckleberry Finn
Just btw: you know this one is a bad habit: root@MX21

:)

Re: Changing border color of window

Posted: Sat Dec 11, 2021 9:04 am
by dolphin_oracle
SpongeBOB wrote: Sat Dec 11, 2021 2:38 am
dolphin_oracle wrote: Fri Dec 10, 2021 10:30 am ...
I *think* this i the command

Code: Select all

glib-compile-resources gtk.resource.xml
executed from the gtk3.0 folder of the theme.
Thank you @dolphin_oracle .

Unfortunately I got a problem when I try to dw the libglib2 ->
CLI wrote: root@MX21b:/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0# glib-compile-resources gtk.gresource.xml
Command 'glib-compile-resources' not found, but can be installed with:
apt install libglib2.0-dev-bin

root@MX21b:/usr/share/themes/mx-comfort-dark-BOB/gtk-3.0# apt install libglib2.0-dev-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libglib2.0-dev-bin
E: Couldn't find any package by glob 'libglib2.0-dev-bin'



Moderator: color removed, please stick to regular color fonts, thank you.
welp it tells you how to fix it.

Re: Changing border color of window

Posted: Sun Dec 19, 2021 2:50 am
by SpongeBOB
Huckleberry Finn wrote: Sat Dec 11, 2021 5:30 am Just btw: you know this one is a bad habit: root@MX21
:)
Yes no worries it's just an offline VM :)

dolphin_oracle wrote: Sat Dec 11, 2021 9:04 am welp it tells you how to fix it.
Sorry I don't understand... what is the fix ?

Re: Changing border color of window

Posted: Sun Dec 19, 2021 8:05 am
by Huckleberry Finn
E: Unable to locate package libglib2.0-dev-bin

Just first update and then try the same..

Code: Select all

sudo apt update ; sudo apt install libglib2.0-dev-bin -y

Re: Changing border color of window

Posted: Sun Jun 22, 2025 1:17 am
by SpongeBOB
Thank you @Huckleberry Finn & @dolphin_oracle

So I have done the following

Code: Select all

apt update && apt install libglib2.0-dev-bin -y
cd /usr/share/themes/mx-comfort-dark-Bob/
glib-compile-resources gtk.gresources.xml
but the last command return
bash wrote: gtk.gresource.xml: to-pixdata preprocessing requested, but GDK_PIXBUF_PIXDATA is not set, and gdk-pixbuf-pixdata is not in PATH.
I've dig and found this documentation https://gnome.pages.gitlab.gnome.org/li ... urces.html

it seem that GDK_PIXBUF_PIXDATA should be the path pointing to gdk-pixbuf-pixdata executable.

apt list 'gdk-pixbuf*'
bash wrote: gdk-pixbuf-tests/stable ....
I'm not sure that this will install gdk-pixbuf-pixdata ? EDIT: and if not, how to install it ?

I install it with apt install libgtk-3-dev

To be continued... :)

Re: Changing border color of window

Posted: Sun Jun 22, 2025 3:31 am
by Eadwine Rose
Are you still on the same system? This topic is 4 years old.

If not you should open a new topic.

Re: Changing border color of window

Posted: Sun Jun 22, 2025 3:39 am
by SpongeBOB
Hi @Eadwine Rose,

No I'm on the last MX version, no worries. but anyways the solution in this topics still apply.

I finally did want I wanted and marked the topic as solved.

Re: Changing border color of window

Posted: Sun Jun 22, 2025 3:41 am
by Eadwine Rose
Ah good... next time please don't dig up old topics, start a new one instead. Thanks.