From e2f01ba0be5166948264c7165bfcf8a1b9c63770 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 8 Jun 2022 17:43:40 +0300 Subject: [PATCH] add swaymirror.bash for mirroring displays on Sway using wayvnc and Remmina --- bash/swaymirror.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bash/swaymirror.bash diff --git a/bash/swaymirror.bash b/bash/swaymirror.bash new file mode 100755 index 0000000..bf0abd9 --- /dev/null +++ b/bash/swaymirror.bash @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# As Sway doesn't support display mirroring, using VNC seems like the least +# bad workaround that was suggested in the issue. +# https://github.com/swaywm/sway/issues/1666 + +set -x + +# -r mirrors cursor, eDP-1 is the internal display name on lumina to be mirrored +wayvnc ::1 -r -o eDP-1& + +# So I won't forget it and think something broke +notify-send "Remember to Mod-Shift-NUM to exit black screen" +# So Remmina doesn't start too fast and fail to connect for it. +sleep 5 + +# remmina is the first wayland using VNC client I encountered. --display is Xorg +# so it will need to be moved to proper workspace and fullscreened manually +remmina --disable-toolbar --enable-fullscreen "vnc://[::1]" + +set +x