Tutorials/Force Transparency And Blur: Difference between revisions

From KDE UserBase Wiki
m (formatting)
m (fix typos and formating for translation)
Line 1: Line 1:
<languages />
<translate>
For those who care about blur, here is all the info you can get.
For those who care about blur, here is all the info you can get.


== Window decorations only ==
== Window decorations only ==


You want the terminal to be blury from top to bottom for example. In this case you will need to find some window decorations that are transparent. Obviously you need to make sure the blur is enabled under desktop effects.I don't even use window decorations so can't really recommend a theme for you (achieved that by going to <menuchoice>Window Decorations</menuchoice> &rarr; <menuchoice>Configure Breeze...</menuchoice> &rarr; <menuchoice>Windows-Specific Overrides</menuchoice> &rarr; add a rule with the regular expression <code>.*</code>.
You want the terminal to be blurry from top to bottom for example. In this case you will need to find some window decorations that are transparent. Obviously you need to make sure the blur is enabled under desktop effects.I don't even use window decorations so can't really recommend a theme for you (achieved that by going to <menuchoice>Window Decorations</menuchoice> &rarr; <menuchoice>Configure Breeze...</menuchoice> &rarr; <menuchoice>Windows-Specific Overrides</menuchoice> &rarr; add a rule with the regular expression <code>.*</code>.


== Window body transparency ==
== Window body transparency ==
Line 9: Line 11:
=== Kvantum ===
=== Kvantum ===


Install kvantum from [https://github.com/tsujan/Kvantum/tree/master/Kvantum Kvantum github]. Change to the Kvantum widget style in the <menuchoice>Application Style</menuchoice> &rarr; <menuchoice>Widget Style</menuchoice>. Make sure you choose what theme you want under the separate application called kvantum engine after you installed kvantum itself. Also you can modify settings there as well.  
Install Kvantum from [https://github.com/tsujan/Kvantum/tree/master/Kvantum Kvantum github]. Change to the Kvantum widget style in the <menuchoice>Application Style</menuchoice> &rarr; <menuchoice>Widget Style</menuchoice>. Make sure you choose what theme you want under the separate application called kvantum engine after you installed kvantum itself. Also you can modify settings there as well.  


To get blur install some kvantum theme with transparency like [https://github.com/PapirusDevelopmentTeam/materia-kde Materia Blur] or [https://store.kde.org/p/1201321 Kvglass] and choose that as your current theme. More so, to edit the themes you can for example edit the materia colors with something like this:
To get blur install some Kvantum theme with transparency like [https://github.com/PapirusDevelopmentTeam/materia-kde Materia Blur] or [https://store.kde.org/p/1201321 Kvglass] and choose that as your current theme. More so, to edit the themes you can for example edit the materia colors with something like this:
<syntaxhighlight lang="bash" line>
<syntaxhighlight lang="bash" line>
sudo sed -i 's/#4285f4/#3daee9/g' MateriaBlur.kvconfig
sudo sed -i 's/#4285f4/#3daee9/g' MateriaBlur.kvconfig
Line 17: Line 19:
</syntaxhighlight>
</syntaxhighlight>


which will replace the normal color with the breeze blue. You can do this by also opening a text editor and replace the color as you would normally do.
which will replace the normal color with the Breeze blue. You can do this by also opening a text editor and replace the color as you would normally do.


===Keep breeze style===
===Keep breeze style===
There is no need to install kvantum.


Create a transparency kwin rule > make everything unimportant. Thus it will apply to everything. FORCE the active or inactive opacity to how much you want in the very last tab.
There is no need to install Kvantum.
 
Create a transparency Kwin rule > make everything unimportant. Thus, it will apply to everything. FORCE the active or inactive opacity to how much you want in the very last tab.


[[File:KwinForceOpacity.png|500px|center]]
[[File:KwinForceOpacity.png|500px|center]]
Line 28: Line 31:
Create another rule on top of the first that will be an exclusion rule. Separate window titles with |. So for ex conky|pqiv|plasmashell|something. For this one force the opacity to 100%. In case you don't know what window class something has (tho it is usually in the titlebar) you can press <keycap>ALT+F3</keycap> &rarr; <menuchoice>More actions</menuchoice> &rarr; <menuchoice>Special Window Settings</menuchoice> and get the window class or when you create a rule there is a button that will let you click on something to get its properties (detect window properties).
Create another rule on top of the first that will be an exclusion rule. Separate window titles with |. So for ex conky|pqiv|plasmashell|something. For this one force the opacity to 100%. In case you don't know what window class something has (tho it is usually in the titlebar) you can press <keycap>ALT+F3</keycap> &rarr; <menuchoice>More actions</menuchoice> &rarr; <menuchoice>Special Window Settings</menuchoice> and get the window class or when you create a rule there is a button that will let you click on something to get its properties (detect window properties).


Install the Kwin script force blur and give it all the windows you want to have blur. Make sure you also read the instructions for it because you need to run 2 commands to be able to actually edit its options. So pretty much everything under {{Path|.local/share/applications}} and {{Path|/usr/share/applications}} can be added ernatively you can have a script like this and have it run at startup. The force blur thing does the same thing.
Install the Kwin script force blur and give it all the windows you want to have blur. Make sure you also read the instructions for it because you need to run 2 commands to be able to actually edit its options. So pretty much everything under {{Path|.local/share/applications}} and {{Path|/usr/share/applications}} can be added alternatively you can have a script like this and have it runs at startup. The force blur thing does the same thing.</translate>
 
<syntaxhighlight lang="bash" line>
<syntaxhighlight lang="bash" line>
if [[ $(ps --no-header -p $PPID -o comm) =~ '^yakuake|dolphin$' ]]; then
if [[ $(ps --no-header -p $PPID -o comm) =~ '^yakuake|dolphin$' ]]; then
Line 37: Line 41:
</syntaxhighlight>
</syntaxhighlight>


<translate>
[[Category:Tutorials]] [[Category:Desktop]]
[[Category:Tutorials]] [[Category:Desktop]]
</translate>

Revision as of 11:59, 4 May 2019

Other languages:

For those who care about blur, here is all the info you can get.

Window decorations only

You want the terminal to be blurry from top to bottom for example. In this case you will need to find some window decorations that are transparent. Obviously you need to make sure the blur is enabled under desktop effects.I don't even use window decorations so can't really recommend a theme for you (achieved that by going to Window DecorationsConfigure Breeze...Windows-Specific Overrides → add a rule with the regular expression .*.

Window body transparency

Kvantum

Install Kvantum from Kvantum github. Change to the Kvantum widget style in the Application StyleWidget Style. Make sure you choose what theme you want under the separate application called kvantum engine after you installed kvantum itself. Also you can modify settings there as well.

To get blur install some Kvantum theme with transparency like Materia Blur or Kvglass and choose that as your current theme. More so, to edit the themes you can for example edit the materia colors with something like this:

sudo sed -i 's/#4285f4/#3daee9/g' MateriaBlur.kvconfig
sudo sed -i 's/#4285f4/#3daee9/g' MateriaBlur.svg

which will replace the normal color with the Breeze blue. You can do this by also opening a text editor and replace the color as you would normally do.

Keep breeze style

There is no need to install Kvantum.

Create a transparency Kwin rule > make everything unimportant. Thus, it will apply to everything. FORCE the active or inactive opacity to how much you want in the very last tab.

Create another rule on top of the first that will be an exclusion rule. Separate window titles with |. So for ex conky|pqiv|plasmashell|something. For this one force the opacity to 100%. In case you don't know what window class something has (tho it is usually in the titlebar) you can press ALT+F3More actionsSpecial Window Settings and get the window class or when you create a rule there is a button that will let you click on something to get its properties (detect window properties).

Install the Kwin script force blur and give it all the windows you want to have blur. Make sure you also read the instructions for it because you need to run 2 commands to be able to actually edit its options. So pretty much everything under .local/share/applications and /usr/share/applications can be added alternatively you can have a script like this and have it runs at startup. The force blur thing does the same thing.

if [[ $(ps --no-header -p $PPID -o comm) =~ '^yakuake|dolphin$' ]]; then
    for wid in $(xdotool search --pid $PPID); do
       xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $wid;
    done
fi