diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-03 17:16:53 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-03 17:16:53 +0400 |
| commit | dc56f9885c3875a96e6b0a7ce6f6d5b4842a61d0 (patch) | |
| tree | 82eb5680694b0073d9c7c1e32ef0f6173f01883d | |
| parent | 2b3a80b477865177dbdf030d9d5360191b03f312 (diff) | |
| download | niri-dc56f9885c3875a96e6b0a7ce6f6d5b4842a61d0.tar.gz niri-dc56f9885c3875a96e6b0a7ce6f6d5b4842a61d0.tar.bz2 niri-dc56f9885c3875a96e6b0a7ce6f6d5b4842a61d0.zip | |
wiki: Improve Xwayland page
| -rw-r--r-- | wiki/Xwayland.md | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/wiki/Xwayland.md b/wiki/Xwayland.md index 95644ee9..3178a1a6 100644 --- a/wiki/Xwayland.md +++ b/wiki/Xwayland.md @@ -2,6 +2,7 @@ X11 is very cursed, so built-in Xwayland support is not planned at the moment. However, there are multiple solutions to running X11 apps in niri. ## Directly running Xwayland in rootful mode + This method involves invoking XWayland directly and running it as its own window, it also requires an extra X11 window manager running inside it.  @@ -17,11 +18,24 @@ This way you can manage X11 windows inside the Xwayland instance. With fullscreen game inside a fullscreen Xwayland you get pretty much a normal gaming experience. +> [!TIP] +> If you don't run an X11 window manager, Xwayland will close and re-open its window every time all X11 windows close and a new one opens. +> To prevent this, start an X11 WM inside as mentioned above, or open some other long-running X11 window. + One caveat is that currently rootful Xwayland doesn't seem to share clipboard with the compositor. For textual data you can do it manually using [wl-clipboard](https://github.com/bugaevc/wl-clipboard), for example: - `env DISPLAY=:0 xsel -ob | wl-copy` to copy from Xwayland to niri clipboard -- `wl-paste | env DISPLAY=:0 xsel -ib` to copy from niri to Xwayland clipboard +- `wl-paste -n | env DISPLAY=:0 xsel -ib` to copy from niri to Xwayland clipboard + +You can also bind these to hotkeys if you want: + +``` +binds { + Mod+Shift+C { spawn "sh" "-c" "env DISPLAY=:0 xsel -ob | wl-copy"; } + Mod+Shift+V { spawn "sh" "-c" "wl-paste -n | env DISPLAY=:0 xsel -ib"; } +} +``` ## Using the Cage Wayland compositor @@ -45,4 +59,4 @@ Comment=Access all of your favorite music Icon=com.spotify.Client Exec=cage -- flatpak run com.spotify.Client Terminal=false -```
\ No newline at end of file +``` |
