sway
i3-compatible Wayland window manager
TLDR
Start sway
View documentation for i3 (sway uses the same default keybindings)
SYNOPSIS
sway [options]
sway --version
sway --help
sway --debug
sway --validate [--config <file>]
PARAMETERS
--version
Displays the Sway version information and exits.
--debug
Enables verbose debug logging for Sway and its components, useful for troubleshooting.
--validate
Checks the specified or default configuration file for syntax errors without starting the compositor.
--config <file>
Specifies an alternative configuration file to load instead of the default (~/.config/sway/config or ~/.config/i3/config).
--verbose
Enables verbose logging output, providing more detailed information than default logging.
--quiet
Suppresses all logging output to stderr during Sway's operation.
--exec <command>
Executes a specified shell command after Sway has successfully initialized. Often used to start status bars or other session-specific applications.
--no-exec
Prevents Sway from executing any default session commands or commands specified with --exec.
--display <display>
Specifies the Wayland display name to connect to. Typically handled by the environment, less common for direct manual use when starting a session.
DESCRIPTION
Sway is a tiling Wayland compositor designed as a direct replacement for the popular i3 window manager, but for the modern Wayland display server protocol instead of X11. It aims for full compatibility with i3's configuration file format and IPC interface, allowing users to seamlessly transition their existing i3 setups to a Wayland-native environment. Sway organizes application windows in a non-overlapping grid, maximizing screen real estate and facilitating efficient multi-tasking. It supports highly customizable keybindings, multiple workspaces, and a wide array of Wayland protocols, providing a secure and performant desktop experience. Leveraging Wayland's architectural benefits, Sway offers a contemporary alternative to traditional X11-based tiling window managers.
CAVEATS
Wayland-only: Sway functions exclusively on the Wayland display protocol. While it supports X11 applications via Xwayland, a functional Wayland setup is a prerequisite.
GPU Drivers: Optimal performance and stability heavily rely on properly configured hardware-accelerated GPU drivers. Software rendering can severely degrade the user experience.
Configuration: Sway's behavior is entirely driven by its text-based configuration file. Errors in this file can prevent Sway from starting or functioning correctly, necessitating careful review and validation.
<B>CONFIGURATION FILE</B>
Sway's entire behavior, including keybindings, workspace management, output settings, and auto-starting applications, is defined in a plain text configuration file. The default locations are typically ~/.config/sway/config or ~/.config/i3/config. Its syntax is nearly identical to i3's, providing extensive customization options.
<B>STARTING SWAY</B>
Sway is commonly launched by a display manager (e.g., GDM, SDDM, Ly) as a user session. Alternatively, it can be started directly from a TTY by adding `exec sway` to a session script, such as a custom `.bash_profile` or an equivalent for Wayland-based environments, allowing it to take control of the display and manage applications.
HISTORY
Sway was developed to port the acclaimed tiling window management paradigm of i3 to the then-emerging Wayland display server protocol. Initiated as an open-source endeavor, its core design principle was to achieve complete compatibility with i3's configuration syntax and Inter-Process Communication (IPC) interface. This strategic choice enabled existing i3 users to effortlessly transition to a Wayland-native environment without needing to re-learn their desktop workflow or keybindings, significantly contributing to its rapid adoption and establishment as a robust Wayland compositor.