Tutorials/Using Other Window Managers with Plasma/fr: Difference between revisions

From KDE Wiki Sandbox
(Created page with "{{Construction/fr}}")
(Updating to match new version of source page)
 
(78 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages />
<languages />
{{Construction/fr}}


==Introduction==
== Introduction ==


KWin is the default window manager (WM) in Plasma and has lot of features, but only support floating windows. Plasma let you use another window manager for example i3, bspwm or [https://wiki.archlinux.org/index.php/Window_managers any other tilling window manager].
KWin est le gestionnaire de fenêtres (WM) dans Plasma et à de nombreuses fonctionnalité, mais ne supporte uniquement des fenêtres flottantes. Plasma vous laisse utiliser un autre gestionnaire de fenêtres par exemple i3, bspwm ou [https://wiki.archlinux.org/index.php/Window_managers n'importe quelle autre gestionnaire de fenêtre par pavage].


{{Warning|Other window managers are only available when using X.org. These changes can not be made for Wayland sessions.}}
[[File:Plasma_i3.png|500px|thumb|center|Plasma utilisant i3 comme gestionnaire de fenêtres]]


Most window managers require few, if any, changes to their configuration files.
{{Warning/fr|D'autre gestionnaire de fenêtre sont uniquement disponible en utilisant X.org.  Ces changements ne peuvent pas encore être réalisés pour les sessions Wayland. Avec un  Wayland plus mature et les extensions Wayland qui commencent à se normaliser, cette fonctionalité pourrait être implémentée dans Wayland <ref>https://drewdevault.com/2018/04/28/KDE-Sprint-retrospective.html</ref> }}


Some considerations to be aware of when using another window manager:
Beaucoup de gestionnaire de fenêtre nécessite peu, voire aucune, modifications de leurs fichiers de  configuration.


*Tiling window managers may have problems with components like panels. For some configuration options will help alleviate issues
Quelques considérations à prendre en compte lorsque vous utilisez un autre gestionnaire de fenêtres :


* Most window managers do not have their own compositors, and therefore lack such features as animations and transparency. If such effects are desired, a compositor, such as '''compton''', is required
* Empiler les gestionnaires de fenêtres peut générer des problèmes avec les composants tels que les panneaux. Pour certaines configurations, certaines options aideront à surmonter les problèmes


==Using Another Window Manager with Plasma ==
* La plupart des gestionnaires de fenêtres ne possèdent pas leur propre compositeur, c'est pourquoi certaines fonctionalités leur sont absentes comme les animations ou a transparence. Si de tels effets sont souhaités, un compositeur tel que '''compton''' est nécessaire.
===Single User: Using System Settings===
** Compositors can also help with screen tearing, however check first if you can resolve it with your video drivers, as this will be a more performant solution in most cases.


This is the simplest method, but only affects the user for which it is added
<div class="mw-translate-fuzzy">
== Utiliser un autre gestionnaire de fenêtre avec Plasma ==
</div>


[[Image:kde-i3-integration.png]]
To use a different window manager with Plasma, replace the systemd service for KWin with a new user unit for your preferred WM. A tutorial can be found in the [https://wiki.archlinux.org/title/KDE#Use_a_different_window_manager ArchWiki].


*Create a shell script (kde-i3.sh as an example), containing the following{{Input|1=<nowiki>
<div class="mw-translate-fuzzy">
#!/bin/sh
==Configuration de I3==
export KDEWM=/usr/bin/i3
</div>
 
To make a non-standard WM work well with Plasma, some additional configuration may be required.
 
===i3===
 
<div class="mw-translate-fuzzy">
===Installation===
</div>
 
Avant de commencer la configuration, vous devez vous assurer que i3 ou i3-gaps sont installés sur votre système. S'ils ne le sont pas, utilisez votre gestionnaire de paquets ou  [[Special:myLanguage/Discover|Discover]] pour installer l'un de ces deux paquets.
 
<div class="mw-translate-fuzzy">
=== Configurer i3 ===
</div>
 
Lorsque vous exécutez i3 pour la première fois, sa configuration globale par défaut (dans <code>/etc/i3/config</code>) va lancer i3-config-wizard, qui fournit un dialogue pour la sélection de clé Mod et génère la configuration locale de l'utilisateur dans <code>~/.i3/config</code>.
 
Si vous voulez conserver la même configuration pour tous  les utilisateurs (ils pourront encore le réécraser avec leur propre configuration locale), supprimez l'appel de l'assistant du fichier de configuration global et utilisez le directement.
 
 
The following i3 window rules will help you with notifications and some other plasma windows:
{{Input|1=<nowiki>for_window [title="Desktop — Plasma"] kill, floating enable, border none
for_window [class="plasmashell"] floating enable
for_window [class="Plasma"] floating enable, border none
for_window [title="plasma-desktop"] floating enable, border none
for_window [title="win7"] floating enable, border none
for_window [class="krunner"] floating enable, border none
for_window [class="Kmix"] floating enable, border none
for_window [class="Klipper"] floating enable, border none
for_window [class="Plasmoidviewer"] floating enable, border none
for_window [class="(?i)*nextcloud*"] floating disable
for_window [class="plasmashell" window_type="notification"] floating enable, border none, move right 700px, move down 450px
no_focus [class="plasmashell" window_type="notification"]
</nowiki>}}
</nowiki>}}
Replace /usr/bin/i3 with the path to the window manager desired.


* Start '''System Settings'''
Si vous utilisez une installation de Plasma qui n'est pas en langue anglaise, vous devez trouver quel est le titre exact de la fenêtre du bureau. Une manière de faire cela est d'utiliser <code>wmctrl -l</code>.


* Select '''Startup and Shutdown'''
Au lieu d'ajouter
{{Input|1=<nowiki>for_window [title="Desktop — Plasma"] kill; floating enable; border none
</nowiki>}}


* Select '''Autostart'''
ajoutez le nom de la fenêtre à la configuration i3. Cet exemple utilise l'installation Plasma en allemand.
{{Input|1=<nowiki>for_window [title="Arbeitsfläche — Plasma"] kill; floating enable; border none
</nowiki>}}


* Click the '''Add script''' button below the list
Notification positioning can be tricky, since not all notifications have the same size depending on their content. You can also use coordinates positioning, knowing your screen resolution. For example, for a 1920x1080 screen and notifications in the top-right corner we can use:{{Input|1=<nowiki>
for_window [class="plasmashell" window_type="notification"] floating enable, border none, move position 1450px 20px
</nowiki>}}
 
If you want to unlock KWallet automatically on login, configure PAM and then add the following line to your i3 configuration file:
{{Input|1=<nowiki>exec --no-startup-id /usr/lib/pam_kwallet_init
</nowiki>}}


* Enter the location of the script created earlier, or use the folder icon to use a dialog to find it. Click '''OK''', the script will be added to the list
<div class="mw-translate-fuzzy">
=== Configurer Plasma ===
</div>


* In the '''Run On''' column, select '''Before Session Startup''' from the drop down list
You may get into issues related with the "Activities" feature - activating it via keyboard shortcuts (some of which are also used by i3, like "Meta + Q") seems to make i3 unresponsive. Removing Activity related global shortcuts seems to resolve this.


* The chosen window manager will be used the next time you log in
To get the Plasma provided pager display desktops as i3bar, set '''Pager Settings''' > '''General''' > '''Text display''' to "Desktop name"


=== System Wide: Adding an XSession===
<div class="mw-translate-fuzzy">
== Configuration de bspwm ==
</div>


If superuser (root) access is available, a new session file for X.org can be created.
Dans la plupart des cas, bspwm demande quelques petites déclarations supplémentaires.


This has several advantages: the alternate session is available to all users of the system, and changing back to KWin is as simple as logging out and then back in
* A single Plasma panel, in most cases, is detected properly and bspwm will not place windows in its space. If the panel ends up presenting a problem, or when using multiple panels, the following may be added to '''.bspwmrc'''{{Input|1=<nowiki>bspc config top_padding size</nowiki>}}where '''size''' is the size of the panel in pixels. Also valid are bottom_padding, left_padding, and right_padding. As many of these directives may be used as necessary for multiple panels.


To add a session for an alternate window manager, as the superuser
== Conseils et astuces ==


* Copy the existing Plasma session flie{{Input|1=<nowiki>cp plasma.desktop plasma-i3.desktop</nowiki>}}
=== DBus ===


* Using a text editor, open the file and change the Exec line, and optionally the Description{{Input|1=<nowiki>[Desktop Entry]
Vous pouvez ouvrir certains composants Plasma avec les commandes DBus. Ainsi vous pouvez créer des raccourcis clavier vers ces commandes DBus. Pour trouver une commande DBus spécifique, vous pouvez utiliser QDbusViewer.
Type=XSession
 
Exec=env KDEWM=/usr/bin/i3
You can open some Plasma components with DBus commands. You can use this to map corresponding keybindings to DBus commands. To find a specific DBus command, you can look at <code>dbus-monitor</code> or <code>qdbusviewer</code> while you invoke the component in a standard Plasma set-up.
DesktopNames=KDE
 
Name=Plasma (i3)
D'autres informations sur la gestion des méta clés :
Comment=Plasma by KDE w/i3
 
X-KDE-PluginInfo-Version=5.14.4
* [https://www.reddit.com/r/kde/comments/6wn5lk/bind_meta_key_alone_to_do_something/ Billet Reddit décrivant la relation ''Meta key - KWin'']
</nowiki>}}
 
* [https://zren.github.io/2019/03/04/activate-any-widget-with-meta-key Billet de blog décrivant la relation ''DBus - Component'' ]


* The display manager must be restarted, most easily by rebooting


==I3 configuration==
Quelques exemples :


===Installation===
* Ouvrir Krunner {{Input/fr|1=<nowiki>qdbus org.kde.kglobalaccel /component/krunner org.kde.kglobalaccel.Component.invokeShortcut 'run command'</nowiki>}}
* Ouvrir l'écran de confirmation de déconnexion {{Input/fr|1=<nowiki>qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1</nowiki>}}


Before starting the configuration, you should make sure i3 or i3-gaps are installed on your system. If not use your packet manager or [[Special:myLanguage/Discover|Discover]] to install one of this two packages. You should also install a compositor, because unlike KWin, i3 don't ship with an integrated compositor. I recommend the use of compton.  
* Open Krunner {{Input|1=<nowiki>qdbus org.kde.kglobalaccel /component/krunner org.kde.kglobalaccel.Component.invokeShortcut 'run command'</nowiki>}}


===Create a default i3 configuration===
* Open logout confirmation screen {{Input|1=<nowiki>qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1</nowiki>}}


{{Note|If you already have an i3 configuration file (usually at <code>.i3/config</code> or <code>.config/i3/config</code>), you can skip this step.}}
Pour i3, vous pouvez définir un raccourci clavier avec  la commande  bindsym. Exemple :


[[Special:myLanguage/Tutorials/Open a console|Open a console]] and type <code>i3-config-wizard</code>. This command open a small windows that will help you create a configuration file.
{{Input/fr|1=<nowiki>bindsym $mod+Shift+e exec <command></nowiki>}}


[[File:i3-wizard.png|500px]]
Si vous voulez faire correspondre la clé du modificateur lui-même, utilisez la commande '''bindcode''' - vous devez préciser le code de clé généré par la clé, que vous pouvez obtenir via l'utilitaire  <code>xev</code>.


Some i3 keybinding can be used to provide better integration with Plasma.
Exemple pour la Meta key:
{{Input|1=<nowiki># Open logout confirmation screen with $mod+e
{{Input|1=<nowiki>bindcode 133 --release exec --no-startup-id <command></nowiki>}}
bindsym $mod+Shift+e exec qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1
# Open krunner with $mod+d
bindsym $mod+d exec qdbus org.kde.kglobalaccel /component/krunner org.kde.kglobalaccel.Component.invokeShortcut 'run command'
</nowiki>}}


Some i3 window rules help you to have notification and some other plasma windows as floating windows:
Pour Bspwn, vous devez utiliser le programme <code>bspc</code> . Voir le [https://wiki.archlinux.org/index.php/Bspwm#Keyboard wiki de l'archive linux] pour plus d'informations.
{{Input|1=<nowiki>for_window [title="Desktop — Plasma"] kill; floating enable; border none
for_window [class="plasmashell"] floating enable;
for_window [class="Plasma"] floating enable; border none
for_window [title="plasma-desktop"] floating enable; border none
for_window [title="win7"] floating enable; border none
for_window [class="krunner"] floating enable; border none
for_window [class="Kmix"] floating enable; border none
for_window [class="Klipper"] floating enable; border none
for_window [class="Plasmoidviewer"] floating enable; border none
for_window [class="(?i)*nextcloud*"] floating disable
</nowiki>}}


==bspwm==
== Davantage d'informations ==


For the most part, bspwm requires little additional configuration.
* [https://en.wikipedia.org/wiki/X_window_manager Gestionnaires de fenêtres] (Wikipedia)
* [https://wiki.archlinux.org/index.php/Window_managers Gestionnaires de fenêtres] (Arch Linux wiki)
* [https://en.wikipedia.org/wiki/Desktop_environment Environment du bureau] (Wikipedia)
* [https://wiki.archlinux.org/index.php/Desktop_environment Environment du bureau] (Arch Linux wiki)


* A single Plasma panel, in most cases, is detected properly and bspwm will not place windows in its space. If the panel does present a problem, or when using multiple panels, the following may be added to '''.bspwmrc'''{{Input|1=<nowiki>bspc config top_padding size</nowiki>}}where '''size''' is the size in pixels of the panel. Also valid are bottom_padding, left_padding, and right_padding. As many of these directive may be used as necessary for multiple panels.
== Références ==


[[Category:Tutorials]]
[[Category:Tutorials]]

Latest revision as of 12:10, 2 January 2023

Introduction

KWin est le gestionnaire de fenêtres (WM) dans Plasma et à de nombreuses fonctionnalité, mais ne supporte uniquement des fenêtres flottantes. Plasma vous laisse utiliser un autre gestionnaire de fenêtres par exemple i3, bspwm ou n'importe quelle autre gestionnaire de fenêtre par pavage.

Plasma utilisant i3 comme gestionnaire de fenêtres
Attention
D'autre gestionnaire de fenêtre sont uniquement disponible en utilisant X.org. Ces changements ne peuvent pas encore être réalisés pour les sessions Wayland. Avec un Wayland plus mature et les extensions Wayland qui commencent à se normaliser, cette fonctionalité pourrait être implémentée dans Wayland [1]


Beaucoup de gestionnaire de fenêtre nécessite peu, voire aucune, modifications de leurs fichiers de configuration.

Quelques considérations à prendre en compte lorsque vous utilisez un autre gestionnaire de fenêtres :

  • Empiler les gestionnaires de fenêtres peut générer des problèmes avec les composants tels que les panneaux. Pour certaines configurations, certaines options aideront à surmonter les problèmes
  • La plupart des gestionnaires de fenêtres ne possèdent pas leur propre compositeur, c'est pourquoi certaines fonctionalités leur sont absentes comme les animations ou a transparence. Si de tels effets sont souhaités, un compositeur tel que compton est nécessaire.
    • Compositors can also help with screen tearing, however check first if you can resolve it with your video drivers, as this will be a more performant solution in most cases.

Utiliser un autre gestionnaire de fenêtre avec Plasma

To use a different window manager with Plasma, replace the systemd service for KWin with a new user unit for your preferred WM. A tutorial can be found in the ArchWiki.

Configuration de I3

To make a non-standard WM work well with Plasma, some additional configuration may be required.

i3

Installation

Avant de commencer la configuration, vous devez vous assurer que i3 ou i3-gaps sont installés sur votre système. S'ils ne le sont pas, utilisez votre gestionnaire de paquets ou Discover pour installer l'un de ces deux paquets.

Configurer i3

Lorsque vous exécutez i3 pour la première fois, sa configuration globale par défaut (dans /etc/i3/config) va lancer i3-config-wizard, qui fournit un dialogue pour la sélection de clé Mod et génère la configuration locale de l'utilisateur dans ~/.i3/config.

Si vous voulez conserver la même configuration pour tous les utilisateurs (ils pourront encore le réécraser avec leur propre configuration locale), supprimez l'appel de l'assistant du fichier de configuration global et utilisez le directement.


The following i3 window rules will help you with notifications and some other plasma windows:

for_window [title="Desktop — Plasma"] kill, floating enable, border none
for_window [class="plasmashell"] floating enable
for_window [class="Plasma"] floating enable, border none
for_window [title="plasma-desktop"] floating enable, border none
for_window [title="win7"] floating enable, border none
for_window [class="krunner"] floating enable, border none
for_window [class="Kmix"] floating enable, border none
for_window [class="Klipper"] floating enable, border none
for_window [class="Plasmoidviewer"] floating enable, border none
for_window [class="(?i)*nextcloud*"] floating disable
for_window [class="plasmashell" window_type="notification"] floating enable, border none, move right 700px, move down 450px
no_focus [class="plasmashell" window_type="notification"] 

Si vous utilisez une installation de Plasma qui n'est pas en langue anglaise, vous devez trouver quel est le titre exact de la fenêtre du bureau. Une manière de faire cela est d'utiliser wmctrl -l.

Au lieu d'ajouter

for_window [title="Desktop — Plasma"] kill; floating enable; border none

ajoutez le nom de la fenêtre à la configuration i3. Cet exemple utilise l'installation Plasma en allemand.

for_window [title="Arbeitsfläche — Plasma"] kill; floating enable; border none

Notification positioning can be tricky, since not all notifications have the same size depending on their content. You can also use coordinates positioning, knowing your screen resolution. For example, for a 1920x1080 screen and notifications in the top-right corner we can use:

for_window [class="plasmashell" window_type="notification"] floating enable, border none, move position 1450px 20px

If you want to unlock KWallet automatically on login, configure PAM and then add the following line to your i3 configuration file:

exec --no-startup-id /usr/lib/pam_kwallet_init

Configurer Plasma

You may get into issues related with the "Activities" feature - activating it via keyboard shortcuts (some of which are also used by i3, like "Meta + Q") seems to make i3 unresponsive. Removing Activity related global shortcuts seems to resolve this.

To get the Plasma provided pager display desktops as i3bar, set Pager Settings > General > Text display to "Desktop name"

Configuration de bspwm

Dans la plupart des cas, bspwm demande quelques petites déclarations supplémentaires.

  • A single Plasma panel, in most cases, is detected properly and bspwm will not place windows in its space. If the panel ends up presenting a problem, or when using multiple panels, the following may be added to .bspwmrc
    bspc config top_padding size
    where size is the size of the panel in pixels. Also valid are bottom_padding, left_padding, and right_padding. As many of these directives may be used as necessary for multiple panels.

Conseils et astuces

DBus

Vous pouvez ouvrir certains composants Plasma avec les commandes DBus. Ainsi vous pouvez créer des raccourcis clavier vers ces commandes DBus. Pour trouver une commande DBus spécifique, vous pouvez utiliser QDbusViewer.

You can open some Plasma components with DBus commands. You can use this to map corresponding keybindings to DBus commands. To find a specific DBus command, you can look at dbus-monitor or qdbusviewer while you invoke the component in a standard Plasma set-up.

D'autres informations sur la gestion des méta clés :


Quelques exemples :

  • Ouvrir Krunner
    qdbus org.kde.kglobalaccel /component/krunner org.kde.kglobalaccel.Component.invokeShortcut 'run command'
  • Ouvrir l'écran de confirmation de déconnexion
    qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1
  • Open Krunner
    qdbus org.kde.kglobalaccel /component/krunner org.kde.kglobalaccel.Component.invokeShortcut 'run command'
  • Open logout confirmation screen
    qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1

Pour i3, vous pouvez définir un raccourci clavier avec la commande bindsym. Exemple :

bindsym $mod+Shift+e exec <command>

Si vous voulez faire correspondre la clé du modificateur lui-même, utilisez la commande bindcode - vous devez préciser le code de clé généré par la clé, que vous pouvez obtenir via l'utilitaire xev.

Exemple pour la Meta key:

bindcode 133 --release exec --no-startup-id <command>

Pour Bspwn, vous devez utiliser le programme bspc . Voir le wiki de l'archive linux pour plus d'informations.

Davantage d'informations

Références