wlmoves is a nested Wayland compositor with one output in each of two parent compositors. Programs connect to wlmoves, not directly to Niri or River. Moving a program changes which nested output displays it, so the client process and Wayland connection stay alive.
Requires wlroots 0.20, Wayland, and xkbcommon development files.
make
From a terminal inside each compositor, print its display name:
echo "$WAYLAND_DISPLAY"
To list all live display sockets and their owning compositors:
ss -xlpn | grep "$XDG_RUNTIME_DIR/wayland-"
Display numbers are assigned dynamically and may change after a compositor restarts. Use ss instead of listing socket files because stale files can remain.
With Niri on wayland-1 and River on wayland-2:
./wlmoves -s 'mpv /path/to/video.mkv' wayland-1 wayland-2 &
proxy=$!
This opens a window with app ID wlmoves in each parent compositor. Make both parent windows fullscreen with the parent compositor's normal controls or window rules.
Switch VTs normally. wlmoves discovers each parent compositor's VT and moves its clients when the active VT changes:
chvt 6
If automatic VT detection is unavailable, toggle manually with Alt+F2 or:
kill -USR1 "$proxy"
Alt+Escape exits the proxy. Alt+F1 cycles keyboard focus when more than one nested client is open.
wlmoves; it cannot adopt an existing native Wayland window./proc and /sys/class/tty/tty0/active.tinywl, not a hardened compositor.14 commits
C
95.3%
Shell
4.0%
wlmoves is a nested Wayland compositor with one output in each of two parent compositors. Programs connect to wlmoves, not directly to Niri or River. Moving a program changes which nested output displays it, so the client process and Wayland connection stay alive.
Requires wlroots 0.20, Wayland, and xkbcommon development files.
make
From a terminal inside each compositor, print its display name:
echo "$WAYLAND_DISPLAY"
To list all live display sockets and their owning compositors:
ss -xlpn | grep "$XDG_RUNTIME_DIR/wayland-"
Display numbers are assigned dynamically and may change after a compositor restarts. Use ss instead of listing socket files because stale files can remain.
With Niri on wayland-1 and River on wayland-2:
./wlmoves -s 'mpv /path/to/video.mkv' wayland-1 wayland-2 &
proxy=$!
This opens a window with app ID wlmoves in each parent compositor. Make both parent windows fullscreen with the parent compositor's normal controls or window rules.
Switch VTs normally. wlmoves discovers each parent compositor's VT and moves its clients when the active VT changes:
chvt 6
If automatic VT detection is unavailable, toggle manually with Alt+F2 or:
kill -USR1 "$proxy"
Alt+Escape exits the proxy. Alt+F1 cycles keyboard focus when more than one nested client is open.
wlmoves; it cannot adopt an existing native Wayland window./proc and /sys/class/tty/tty0/active.tinywl, not a hardened compositor.14 commits
C
95.3%
Shell
4.0%