This is a good one. Let me go back to the beginning …
Once upon a time there was a pandemic and during this pandemic we forgot how to do meetups.
We also (after the pandemic) updated and upgraded ourselves from Ubuntu/X11/i3 to Ubuntu/Wayland/Sway.
And the world was good. Until …
… I tried to do a live demo at the latest Augmented Software Engineering Meetup.
Imaging my surprise when I found out that with Ubuntu/Wayland/Sway there is no good/easy way to mirror your screen to a projector.
Sounds pretty straight forward to me. Turns out it isn’t. And even worse, when you ask chatGPT you will probably get an answer which will suggest to move the position of the two displays to 0,0 … which will make both displays share the mouse pointer, but not the screen itself.
After some manual googling and some more research and reading you might stumble over wl-mirror.
Just to save you some time: This is it! I was not able to find anything else or make anything else work. As far as I can tell, (as at the time of writing) wl-mirror is the best (or maybe your only) option to mirror your screen (with Ubuntu/Wayland/Sway).
Note: This is not to be confused with using a second screen/display (e.g. the projector) to show your presentation. That always worked and works fine. The problem materializes itself when you want to do a live-demo and need to look at your screen and people need to see what you are doing (also known as mirroring your screen to the projector).
Note: wl-mirror works in a weird/interesting way. It is not that you mirror your screen/display to the projector/display. It works the other way around: You move the workspace you want to use for the live-demo to the projector/display and then you tell wl-mirror to mirror that workspace back to your screen/display (so that you can see what happens on the projector/display when/while you are typing). (Initially) That confused me (a little bit). Otherwise wl-mirror is awesome!
Enjoy. Hope to see you soon at a meetup!