Sway Wayland Compositor

repository·master·Indexed 12 days ago

https://github.com/swaywm/sway

An i3-compatible Wayland compositor providing a tiling window management experience. Includes documentation on server lifecycle management via sway_server, session locking with sway_session_lock, and configuration commands for bars, window assignment, and tearing.

Tokens
45.2K
Snippets
215
Records
236
Agent score
96%

What's inside Sway

  1. Install sway from package repositories

    master
    Sway is available in the official repositories of many Linux distributions. You can install it by searching for and installing the sway package using your distribution's package manager.
  2. Build sway from source

    master

    To build the latest version of sway for testing or development, you must first install the necessary build dependencies.

    Required build dependencies:

    • meson
    • wlroots
    • wayland
    • wayland-protocols
    • pcre2
    • json-c
    • pango
    • cairo

    Optional dependencies:

    • gdk-pixbuf2 (required for tray support)
    • scdoc (required for generating man pages)
    • git (used to include version information)

    After installing the dependencies, use meson and ninja to build and install the project.

    meson setup build
    ninja -C build
    sudo ninja -C build install
  3. Compile sway from source

    master

    To build the HEAD of the sway repository and wlroots for testing or development, follow these steps:

    1. Install Dependencies

    Ensure the following dependencies are installed on your system:

    • meson (required for build)
    • wlroots
    • wayland
    • wayland-protocols (required for build)
    • pcre2
    • json-c
    • pango
    • cairo
    • gdk-pixbuf2 (optional: for additional icon formats in the notification area)
    • swaybg (optional: for desktop wallpaper)
    • scdoc (optional: for man pages, required for build)
    • git (optional: for version information, required for build)

    Note: Items marked with * are build-time dependencies only.

    2. Build and Install

    Run the following commands to configure, build, and install sway:

    meson setup build/
    ninja -C build/
    sudo ninja -C build/ install
  4. Run Sway

    master

    To start Sway, execute the sway command from a TTY interface.

    Note on Display Managers: While some display managers may work (for example, gdm is known to work well), they are not fundamentally supported by Sway.

    sway
  5. Install Sway via package managers

    master
    Sway is available in the repositories of many Linux distributions. You can install it by searching for and installing the package named sway using your distribution's package manager.
  6. Install Sway from system packages

    master
    Sway is available in the repositories of many Linux distributions. You can install it by searching for and installing the package named sway using your distribution's package manager.