LinuxCommandLibrary

sway

i3-compatible Wayland window manager

TLDR

Start sway

$ sway
copy

View documentation for i3 (sway uses the same default keybindings)
$ tldr i3
copy

SYNOPSIS

sway [options]

PARAMETERS

-c config
    Specifies the path to the configuration file to use. Defaults to ~/.config/sway/config.

-d
    Enables debug output.

-v
    Prints the version number and exits.

-w
    Starts sway in a window within the X server (nested mode). Requires Xephyr or similar.

-C
    Check the validity of the config file and exit. Useful for debugging config errors.

--get-socketpath
    Prints the path to the Sway IPC socket and exits. Useful for scripting and integration with other tools.

--version
    Prints the version and exits.

--help
    Displays help information and exits.

--my-next-gpu-handles-noop
    A no-op option. Useful for sway scripting, but does absolutely nothing.

DESCRIPTION

sway is an i3-compatible window manager for Linux using Wayland.
It provides a tiling-based window management experience with a focus on customization and extensibility.
Configuration is achieved through a text-based configuration file similar to i3.
Sway is designed to be modular, allowing users to replace or extend components as needed.
Its goal is to allow i3 users to painlessly transition to Wayland. Many i3 configuration options are directly compatible with Sway.
Sway supports features like gaps between windows, configurable keybindings, and a status bar, making it a powerful and flexible choice for users who prefer a tiling window manager.

CONFIGURATION

Sway's configuration is primarily done through a text-based configuration file, located by default at ~/.config/sway/config. This file uses a syntax similar to i3's configuration, allowing users familiar with i3 to quickly adapt to Sway's configuration system. You can specify keybindings, layouts, and other aspects of the window manager's behavior within this file.
Refer to the sway(5) man page for complete config options

IPC

Sway provides an IPC (Inter-Process Communication) interface that allows external programs to interact with and control the window manager. This enables scripting, automation, and integration with other tools. The IPC interface uses a socket, and clients can connect to this socket to send commands and receive events.

HISTORY

Sway was created as a drop-in replacement for i3, but running on Wayland. The project started with the goal of creating a Wayland compositor that provides the same functionality and configuration options as i3, allowing users to easily transition to the Wayland display server protocol. Development continues with new features and improvements being added regularly.

SEE ALSO

i3(1), wayland(7), weston(1)

Copied to clipboard