sway was created to fill the need of an i3-like window manager for Wayland. The upstream i3 developers have no intention of porting i3 to Wayland, and projects proposed by others ended up as vaporware. Many thanks to the i3 folks for providing such a great piece of software, so good that your users would rather write an entirely new window manager from scratch that behaved exactly like i3 rather than switch to something else.

If sway is currently running, you may run sway [command] to send command to the running instance of sway. The same commands you would use in the config file are valid here (see sway(5)). For compatibility reasons, you may also issue commands with swaymsg(1) or i3-msg(1) (or even with i3(1), probably).

If -c is not specified, sway will look in several locations for your config file. The suggested location for your config file is ~/.config/sway/config. ~/.sway/config will also work, and the rest of the usual XDG config locations are supported. If no sway config is found, sway will attempt to load an i3 config from all the config locations i3 supports. Sway looks for a config file in a fallback directory as a last resort, which is /etc/sway/ by default. A standard configuration file is installed at this location. If still nothing is found, you will receive an error.

To write your own config, it’s suggested that you copy the default config file to the location of your choosing and start there.