Tutorials/Force Transparency And Blur/fr: Difference between revisions

From KDE UserBase Wiki
(Created page with "Tutoriels/Forcer l'effet de transparence et de flou")
 
(Created page with "Pour obtenir du flou, installez un thème Kvantum avec transparence tel que [https://github.com/PapirusDevelopmentTeam/materia-kde Materia Blur] ou [https://store.kde.org/p/1201321 Kvglass] et choisissez-le comme thème actuel. De plus, pour éditer les thèmes, vous pouvez, par exemple, éditer les couleurs des matériaux avec quelque chose comme ceci :")
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages />
<languages />
For those who care about blur, here is all the info you can get.
Pour ceux qui ont envie de flou, voici toutes les informations que vous pouvez avoir.


== Window decorations only ==
<span id="Window_decorations_only"></span>
== Décorations de fenêtres seulement ==


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>.
Vous souhaitez que le terminal soit flou de haut en bas par exemple. Dans ce cas, vous devrez trouver des décorations de fenêtres transparentes. Évidemment, vous devez vous assurer que le flou est activé sous les effets de bureau. Je n'utilise même pas de décorations de fenêtre, donc je ne peux pas vraiment vous recommander de thème (j'y suis parvenu en allant dans <menuchoice>Décorations de fenêtre</menuchoice> &rarr; <menuchoice>Configurer Breeze...</menuchoice> &rarr; <menuchoice>Remplacements spécifiques à Windows</menuchoice> &rarr; ajouter une règle avec l'expression régulière <code>.*</code>).


== Window body transparency ==
<span id="Window_body_transparency"></span>
== Transparence du corps de la fenêtre ==


=== 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.  
<div class="mw-translate-fuzzy">
Installer Kvantum depuis le  [https://github.com/tsujan/Kvantum/tree/master/Kvantum github de Kvantum]. Utiliser le style de composant graphique Kvantum dans <menuchoice>Apparence des applications</menuchoice> &rarr; <menuchoice>Style de composants graphique</menuchoice>. Ensuite choisissez le thème que vous souhaitez utiliser dans l'application Kvantum Engine. Vous pouvez aussi modifier ces configurations ici.
</div>


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:
Pour obtenir du flou, installez un thème Kvantum avec transparence tel que [https://github.com/PapirusDevelopmentTeam/materia-kde Materia Blur] ou [https://store.kde.org/p/1201321 Kvglass] et choisissez-le comme thème actuel. De plus, pour éditer les thèmes, vous pouvez, par exemple, éditer les couleurs des matériaux avec quelque chose comme ceci :
<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 18: Line 22:
</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.
qui remplacera la couleur normale par le bleu Breeze. Vous pouvez le faire en ouvrant également un éditeur de texte et en remplaçant la couleur comme vous le feriez normalement.


===Keep breeze style===
<span id="Keep_breeze_style"></span>
===Conserver le style Breeze===


There is no need to install Kvantum.
Il n'est pas nécessaire d'installer Kvantum.
 
Create a transparency Kwin rule by <keycap>Alt+F3</keycap> &rarr; <menuchoice>More actions</menuchoice> &rarr; <menuchoice>Special Window Settings</menuchoice>, then in the dropdown menu for Window Class and Role choose Unimportant instead. Also select all window types, besides Desktop and Splash Screen. Thus, the will apply to everything. FORCE the active or inactive opacity to how much you want in the very last tab under <menuchoice>Appearances and Fixes</menuchoice>. The end result will look like so and can be imported by saving it as {{Path|.kwinrule}}.


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]]


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).
{{Input|1=<nowiki>
[Transparent all the things]
Description=Transparent all the things
clientmachine=localhost
clientmachinematch=0
opacityactive=90
opacityactiverule=2
opacityinactive=80
opacityinactiverule=2
types=445
wmclass=audacious
wmclasscomplete=false
wmclassmatch=0
</nowiki>}}


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.
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 should be placed in the Window Class while having Regexp instead of Unimportant. 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).The end result will look like so, and can be imported by saving it as {{Path|.kwinrule}}.
 
{{Input|1=<nowiki>
[Transparency exceptions]
Description=Transparency exceptions
opacityactive=100
opacityactiverule=2
opacityinactive=100
opacityinactiverule=2
wmclass=conky|pqiv|plasmashell|rpcs3
wmclasscomplete=false
wmclassmatch=3
</nowiki>}}
 
Install the Kwin script [https://store.kde.org/p/1294604/ force blur] and give it all the windows you want to have blur. Before that the command you need to run are the following. After this a setting icon will appear for Force Blur under <menuchoice>Kwin Scripts</menuchoice>.
<syntaxhighlight lang="bash" line>
mkdir -p ~/.local/share/kservices5/
cp ~/.local/share/kwin/scripts/forceblur/metadata.desktop ~/.local/share/kservices5/forceblur.desktop
</syntaxhighlight>
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.


<syntaxhighlight lang="bash" line>
<syntaxhighlight lang="bash" line>
Line 40: Line 78:
</syntaxhighlight>
</syntaxhighlight>


[[Category:Tutorials]] [[Category:Desktop]]
[[Category:Tutoriels/fr]] [[Category:Bureau/fr]]

Latest revision as of 07:39, 27 February 2024

Other languages:

Pour ceux qui ont envie de flou, voici toutes les informations que vous pouvez avoir.

Décorations de fenêtres seulement

Vous souhaitez que le terminal soit flou de haut en bas par exemple. Dans ce cas, vous devrez trouver des décorations de fenêtres transparentes. Évidemment, vous devez vous assurer que le flou est activé sous les effets de bureau. Je n'utilise même pas de décorations de fenêtre, donc je ne peux pas vraiment vous recommander de thème (j'y suis parvenu en allant dans Décorations de fenêtreConfigurer Breeze...Remplacements spécifiques à Windows → ajouter une règle avec l'expression régulière .*).

Transparence du corps de la fenêtre

Kvantum

Installer Kvantum depuis le github de Kvantum. Utiliser le style de composant graphique Kvantum dans Apparence des applicationsStyle de composants graphique. Ensuite choisissez le thème que vous souhaitez utiliser dans l'application Kvantum Engine. Vous pouvez aussi modifier ces configurations ici.

Pour obtenir du flou, installez un thème Kvantum avec transparence tel que Materia Blur ou Kvglass et choisissez-le comme thème actuel. De plus, pour éditer les thèmes, vous pouvez, par exemple, éditer les couleurs des matériaux avec quelque chose comme ceci :

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

qui remplacera la couleur normale par le bleu Breeze. Vous pouvez le faire en ouvrant également un éditeur de texte et en remplaçant la couleur comme vous le feriez normalement.

Conserver le style Breeze

Il n'est pas nécessaire d'installer Kvantum.

Create a transparency Kwin rule by Alt+F3More actionsSpecial Window Settings, then in the dropdown menu for Window Class and Role choose Unimportant instead. Also select all window types, besides Desktop and Splash Screen. Thus, the will apply to everything. FORCE the active or inactive opacity to how much you want in the very last tab under Appearances and Fixes. The end result will look like so and can be imported by saving it as .kwinrule.


[Transparent all the things]
Description=Transparent all the things
clientmachine=localhost
clientmachinematch=0
opacityactive=90
opacityactiverule=2
opacityinactive=80
opacityinactiverule=2
types=445
wmclass=audacious
wmclasscomplete=false
wmclassmatch=0

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 should be placed in the Window Class while having Regexp instead of Unimportant. 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).The end result will look like so, and can be imported by saving it as .kwinrule.

[Transparency exceptions]
Description=Transparency exceptions
opacityactive=100
opacityactiverule=2
opacityinactive=100
opacityinactiverule=2
wmclass=conky|pqiv|plasmashell|rpcs3
wmclasscomplete=false
wmclassmatch=3

Install the Kwin script force blur and give it all the windows you want to have blur. Before that the command you need to run are the following. After this a setting icon will appear for Force Blur under Kwin Scripts.

mkdir -p ~/.local/share/kservices5/
cp ~/.local/share/kwin/scripts/forceblur/metadata.desktop ~/.local/share/kservices5/forceblur.desktop

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