Sway is a tiling window manager like i3 but for wayland using the wlroots compositor. Since wayland is very different compared to XOrg/X11, you can't use the same commands like xrandr.
In this video, I show how to use swaymsg to configure displays (mode, resolution, position, refresh rate, etc) from the command line on Sway.
Note that for the average user, a graphical interface like wdisplays is probably much simpler. But also harder to script... There are also countless wrappers which try to act like xrandr but on wayland - use whatever works best for you!
17 май 2023