sway(1)

๐Ÿ’– sway(1) โ€” the manual page, but make it a group chat ๐Ÿ’–

okay so bestie, welcome to sway(1) from the General Commands Manual โ€” this is the one, the icon, the reason you're here. let's get into it ๐Ÿซถ


โœจ NAME โœจ

sway โ€” an i3-compatible Wayland compositor. that's it. that's the tweet. ๐Ÿ‘‘


๐ŸŒธ SYNOPSIS ๐ŸŒธ

sway [options...] [command]

๐ŸŽ€ OPTIONS ๐ŸŽ€

okay these are the flags, and yes you're gonna want to know all of them, no skipping ๐Ÿ’…

  • -h, --help โ€” shows you the help message and then dips. bye bestie ๐Ÿ‘‹
  • -c, --config <config> โ€” tells sway exactly which config file to use. config is the path, you pick it ๐Ÿ’–
  • -C, --validate โ€” checks if your config file is even valid, then exits. it's giving vibe check for your config ngl ๐Ÿงš
  • -d, --debug โ€” turns on FULL logging, debug info included. every. single. detail. ๐Ÿ”ฅ
  • -v, --version โ€” prints the version number and quits. simple, iconic โญ
  • -V, --verbose โ€” more verbose logging (not the full debug chaos, just extra chatty) ๐ŸŒธ
  • --get-socketpath โ€” gets the IPC socket path, prints it, then exits. one job, does it perfectly ๐Ÿ’€

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

so here's the lore. sway was made to fill the need for an i3-like window manager on Wayland. the upstream i3 devs have zero intention of porting i3 to Wayland, and the projects other people proposed? ended up as vaporware ๐Ÿ˜ญ literally nothing.

huge thanks to the i3 folks for making such a great piece of software โ€” so good, in fact, that users would rather write an entirely new window manager from scratch that behaves exactly like i3 than switch to something else. the dedication?? unreal. ๐Ÿซถ

you can run sway directly from a tty, or via a Wayland-compatible login manager. both slay โœจ


๐Ÿฆ‹ CONFIGURATION ๐Ÿฆ‹

sway goes hunting for a config file in these exact locations, in this exact order:

  1. ~/.sway/config
  2. $XDG_CONFIG_HOME/sway/config โ† this one's the suggested location bestie ๐Ÿ‘‘
  3. ~/.i3/config
  4. $XDG_CONFIG_HOME/i3/config
  5. /etc/sway/config
  6. /etc/i3/config

if $XDG_CONFIG_HOME is unset, it defaults to ~/.config. noted ๐Ÿ’…

โš ๏ธ an error is raised when no config file is found. no config, no vibes, it just yells at you.

the recommended default configuration is usually installed to /etc/sway/config โ€” and you're encouraged to copy that over to ~/.config/sway/config and edit it from there. make it yours, bestie ๐ŸŽ€

for the lowdown on the config file format, see sway(5). iykyk ๐Ÿ“–


๐Ÿ’€ IPC COMMANDS ๐Ÿ’€

okay so swaymsg(1) is generally the preferred way, but you may run sway command to send a command to the running instance of sway. and plot twist โ€” you can also issue commands with i3-msg(1) or even with i3(1). inclusive king behavior honestly ๐ŸŒˆ


๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

the env vars that have an effect on sway ๐Ÿ“

  • SWAYSOCK โ€” specifies the path to the sway IPC socket.
  • XKB_DEFAULT_RULES, XKB_DEFAULT_MODEL, XKB_DEFAULT_LAYOUT, XKB_DEFAULT_VARIANT, XKB_DEFAULT_OPTIONS โ€” configures the xkb keyboard settings. see xkeyboard-config(7). but ngl, the preferred way to configure your keyboard is via the configuration file, see sway-input(5) ๐Ÿ’–

the env vars that sway sets for you ๐ŸŒธ

  • DISPLAY โ€” if compiled with Xwayland support and Xwayland isn't disabled by the config, this gets set to the name of the X display used for Xwayland.
  • I3SOCK โ€” for compatibility with i3, specifies the path to the sway IPC socket.
  • SWAYSOCK โ€” specifies the path to the sway IPC socket. yes it's in both lists, it's that girl ๐Ÿ’…
  • WAYLAND_DISPLAY โ€” specifies the name of the Wayland display that sway is running on.
  • XCURSOR_SIZE โ€” specifies the configured cursor size.
  • XCURSOR_THEME โ€” specifies the configured cursor theme. cute cursor rights!! ๐ŸŽ€

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

maintained by Simon Ser <contact@emersion.fr>, who is assisted by other open source contributors. absolute main character energy, but make it collaborative ๐Ÿซถ

for more information about sway development, see <https://github.com/swaywm/sway>. go lurk, it's fine ๐ŸŒ


โญ SEE ALSO โญ

sway(5) swaymsg(1) sway-input(5) sway-output(5) sway-bar(5) sway-ipc(7)

the whole friend group fr fr ๐Ÿ’œ


and that's the page!! this version is dated 2026-04-26 and it's sway(1) โ€” the one and only. go forth and tile your windows, bestie ๐Ÿงšโœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from