How to reduce opacity of all of the windows/apps in the background?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to reduce opacity of all of the windows/apps in the background?
Hi all,
I am looking for a theme, or a way to modify the default Cinnamon themes (Mint-X/Y), so that only the application window that's front-most is at full opacity. And for every window that's in the background, I would like to reduce its opacity by a certain percentage.
Is this possible? Do any themes do this? Anyone have some hints how to accomplish this by modifying default themes?
Thank you!
I am looking for a theme, or a way to modify the default Cinnamon themes (Mint-X/Y), so that only the application window that's front-most is at full opacity. And for every window that's in the background, I would like to reduce its opacity by a certain percentage.
Is this possible? Do any themes do this? Anyone have some hints how to accomplish this by modifying default themes?
Thank you!
- JoanTheSpark
- Level 1
- Posts: 30
- Joined: Mon Jun 05, 2023 1:48 am
Re: How to reduce opacity of all of the windows/apps in the background?
I can only talk on the latter request..
Copy the theme you're running (and want to mod) from /usr/share/themes/ into /home/<yourID>/.themes/ and give it a different name, otherwise it will be hard to distinguish from the original in the theme selector.
In that new location look for /gtk3.0 or /gtk3.20 and in there for a file called gtk.css
Anything that has got a ':backdrop' after it's name is a style for some aspect of a program that defines how it looks like when it is NOT in focus (i.e. in the background).
If such an entry has got a color value below it, you can directly affect the opacity.. for example 'color: #FFFFFF' would be a white, while 'color: rgba(255,255,255,1.0)' would also be a white with alpha definition.. if you change the last value to 0.0 it becomes 100% transparent.
There also seem to be 'opacity: x.x' entries or 'color: transparent' entries.. what works and what doesn't depends on the element you're dealing with. No idea if images (if there are such elements in your theme) can be affected this way too - I think they need to be images with alpha and their intrinsic opacity adjusted for the use case.. so one for :backdrop and one for "normal".
example (application headerbar in the background with 30% opacity - note: not all applications are gtk3 and/or have their headerbar correctly defined - which means this works for some and not for others):
Check out this post by LPH for info on how to get some gtk debugging tools fired up to help you with telling what is what:
viewtopic.php?p=2416164#p2416164
PS: I have no idea if you'll be able to get ALL apps to obey the transparency as I have no idea how gtk2 or qt apps are being dealt with and told what to do.. good luck.
Copy the theme you're running (and want to mod) from /usr/share/themes/ into /home/<yourID>/.themes/ and give it a different name, otherwise it will be hard to distinguish from the original in the theme selector.
In that new location look for /gtk3.0 or /gtk3.20 and in there for a file called gtk.css
Anything that has got a ':backdrop' after it's name is a style for some aspect of a program that defines how it looks like when it is NOT in focus (i.e. in the background).
If such an entry has got a color value below it, you can directly affect the opacity.. for example 'color: #FFFFFF' would be a white, while 'color: rgba(255,255,255,1.0)' would also be a white with alpha definition.. if you change the last value to 0.0 it becomes 100% transparent.
There also seem to be 'opacity: x.x' entries or 'color: transparent' entries.. what works and what doesn't depends on the element you're dealing with. No idea if images (if there are such elements in your theme) can be affected this way too - I think they need to be images with alpha and their intrinsic opacity adjusted for the use case.. so one for :backdrop and one for "normal".
example (application headerbar in the background with 30% opacity - note: not all applications are gtk3 and/or have their headerbar correctly defined - which means this works for some and not for others):
Code: Select all
headerbar:backdrop {
color: #888888; /* title text color */
background-color: rgba(16, 16, 16, 0.3); }
viewtopic.php?p=2416164#p2416164
PS: I have no idea if you'll be able to get ALL apps to obey the transparency as I have no idea how gtk2 or qt apps are being dealt with and told what to do.. good luck.
Re: How to reduce opacity of all of the windows/apps in the background?
Thank you so much JoanTheSpark !!!
Re: How to reduce opacity of all of the windows/apps in the background?
Following your idea I cropped up a Cinnamon Extension that does precisely what you want without messing with themes.
Please note this extension has been very limitedly tested, and only under Mint 19.2 (so far). It does work but:
- may NOT work under Wayland (can't test myself);
- needs more polishing in regard to stack order of background windows (which one is actually above the other if trying to switch active window);
- may interfere with other extension(s), disabling them; if that happens a Cinnamon reload should fix it;
- behavior is unknown when there are A LOT of open windows, there may be a significant delay in transitions;
- it will not be found in official Spices list, and maintenance is not guaranteed unless someone else forks it, registers it, and commits to its maintenace;
If you agree to the above shortcomings you may download and install it below:
Codeberg repo; old: @GitLab
Re: How to reduce opacity of all of the windows/apps in the background?
My bad, first version was whipped up in a hurry and is buggy. Forgot about Tweener being replaced by ease in Cinnamon 5+, and also some variables were mixed up.
In the mean time I managed to launch a 21.2 virtual machine, upgraded to 21.3 and tested this extension. Fixed it properly for Cinnamon 6.0.
Please forget about v1.0 and download v1.1.1 below:
EDIT: Project can now be found at GitLab here.
In the mean time I managed to launch a 21.2 virtual machine, upgraded to 21.3 and tested this extension. Fixed it properly for Cinnamon 6.0.
Please forget about v1.0 and download v1.1.1 below:
EDIT: Project can now be found at GitLab here.
Last edited by Drugwash on Sat Jan 20, 2024 12:01 am, edited 1 time in total.
Codeberg repo; old: @GitLab
Re: How to reduce opacity of all of the windows/apps in the background?
THANK YOU so much! I use 6.0.4 and it works great! Way better than the hack I attempted above. It also works with all themes! This extensions should be in the main repo... it's so great!Drugwash wrote: ⤴Fri Jan 19, 2024 11:22 pm My bad, first version was whipped up in a hurry and is buggy. Forgot about Tweener being replaced by ease in Cinnamon 5+, and also some variables were mixed up.
In the mean time I managed to launch a 21.2 virtual machine, upgraded to 21.3 and tested this extension. Fixed it properly for Cinnamon 6.0.
Please forget about v1.0 and download v1.1.1 below:
no-distraction@drugwash_1.1.1.zip
Thanks again!
Re: How to reduce opacity of all of the windows/apps in the background?
Oh, and it has pretty sweet settings too!
Re: How to reduce opacity of all of the windows/apps in the background?
Glad it works and you like it.
As for the official repository... I used to own a GitHub account but they stretched too much asking for 2FA which is a no-no for me, so I deleted that account. As such I cannot publish anything in the main repository. Did add it to my Linux GitLab group though.
Anyone is free to fork the project and add it to main repo if they feel they can maintain it in a timely fashion.
As for the official repository... I used to own a GitHub account but they stretched too much asking for 2FA which is a no-no for me, so I deleted that account. As such I cannot publish anything in the main repository. Did add it to my Linux GitLab group though.
Anyone is free to fork the project and add it to main repo if they feel they can maintain it in a timely fashion.
Codeberg repo; old: @GitLab
- JoanTheSpark
- Level 1
- Posts: 30
- Joined: Mon Jun 05, 2023 1:48 am
Re: How to reduce opacity of all of the windows/apps in the background?
The "hack" does nothing else, it's just direct, manually and not as convenient.. but your convenience and blissfulness got bought with Drugwash's time and knowledge to put together a GUI that does the very same thing, while it's future functionality requires upkeep that might not materialize and you're back to square one.
So I highly recommend to at least look at the code to understand how it's done so you can maintain it - in case this fails:
JFYI - most KDE plasma DE's come with stuff like this (and more) out of the box..
Re: How to reduce opacity of all of the windows/apps in the background?
I have been using this for the past 2 months. It's so great! Only issues is that if you have few windows overlaid on top of each other, transparency calculations sometimes flicker (could be graphics driver issues).Drugwash wrote: ⤴Sat Jan 20, 2024 12:05 am Glad it works and you like it.
As for the official repository... I used to own a GitHub account but they stretched too much asking for 2FA which is a no-no for me, so I deleted that account. As such I cannot publish anything in the main repository. Did add it to my Linux GitLab group though.
Anyone is free to fork the project and add it to main repo if they feel they can maintain it in a timely fashion.
I have a suggestion but I'm not sure if it's possible to implement with Cinnamon... is it possible to just "darken" the windows without using the transparency? That would lighten the load on the graphics card.
Thank you so much for this!!
Re: How to reduce opacity of all of the windows/apps in the background?
Yes it's possible. Actually I have here a new version that allows much more effects selectable at will. I've been delaying its publication due to one single feature missing that I can't just find out how to implement and there seems to be no help available. Guess will just have to publish it as is, and if/when that feature will become available will update the code.
Please stand by, will notify when new version is up.
Please stand by, will notify when new version is up.
Codeberg repo; old: @GitLab
Re: How to reduce opacity of all of the windows/apps in the background?
OK, version 1.2.1 is up at the new Codeberg repository. GitLab are much too inept with their retarded web interface to be of any use. That place will remain simply as a backup for the current versions as they are now.
Codeberg offer an interface very similar to that of GitHub so people used to the latter should feel more at home there.
Here's the link: No Distraction v1.2.1
You may also wanna try other Spices or apps while there.
Enjoy!
Codeberg offer an interface very similar to that of GitHub so people used to the latter should feel more at home there.
Here's the link: No Distraction v1.2.1
You may also wanna try other Spices or apps while there.
Enjoy!
Codeberg repo; old: @GitLab
Re: How to reduce opacity of all of the windows/apps in the background?
Absolutely amazing! Using it now! Thank you so much!!!Drugwash wrote: ⤴Sun Mar 24, 2024 12:20 am OK, version 1.2.1 is up at the new Codeberg repository. GitLab are much too inept with their retarded web interface to be of any use. That place will remain simply as a backup for the current versions as they are now.
Codeberg offer an interface very similar to that of GitHub so people used to the latter should feel more at home there.
Here's the link: No Distraction v1.2.1
You may also wanna try other Spices or apps while there.
Enjoy!
Re: How to reduce opacity of all of the windows/apps in the background?
Kind thanks for your appreciation. Enjoy.
Codeberg repo; old: @GitLab