add swaymirror.bash for mirroring displays on Sway using wayvnc and Remmina

This commit is contained in:
Aminda Suomalainen 2022-06-08 17:43:40 +03:00
parent ce041e358e
commit e2f01ba0be
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q

21
bash/swaymirror.bash Executable file
View File

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