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:
~/.sway/config$XDG_CONFIG_HOME/sway/configโ this one's the suggested location bestie ๐~/.i3/config$XDG_CONFIG_HOME/i3/config/etc/sway/config/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. seexkeyboard-config(7). but ngl, the preferred way to configure your keyboard is via the configuration file, seesway-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
- alpine 3.24: sway-doc 1.12_rc3-r0 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms