Sway

Sway (contracted from SirCmpwn's Wayland compositor) is Article description::an open-source [[Wayland compositor that is designed to be compatible with the i3 window manager.]]

Configuration
To view all available configuration options:

Files
Each user running sway can edit the default configuration file in order to run a customized sway session. Gentoo stores this file at its default location:

Terminal emulator
By default the sway configuration file uses the urxvt terminal emulator (found in the package). It is a good idea to emerge this terminal emulator so that a terminal will be available once sway is running:

Another popular choice is which works natively with Wayland if the   environment variable is set to. Users wanting more a barebone, Wayland native, terminal emulator may want to test out Alacritty. Another very lightweight alternative is st, but it isn't Wayland native.

Taking screenshots
To add screenshot support, use the utility (found in the  package). The abbreviation  is defined as Grab Images. This utility is tailored to the specifics of the Wayland protocol. In order to install grim, use the following command:

To add support for determining the boundaries of the selected screen area, the utility, found in the  package, is used in combination with the  utility. To install slurp, use the command:

Next, edit the configuration file to add support for keyboard shortcuts to perform a screenshot operation.

Please note that the or  +  keys combination creates a screenshot in the   buffer. This allows pasting the image directly from the clipboard, without having to save to a file on disk.

For the +  or  +  +  keyboard shortcuts, the method of automatically saving the image file in the  user directory is used.

HiDPI
To adjust sway's rendering for HiDPI displays (4K and above), the name of the display to be adjusted must be obtained. After a sway session is running, issue the following:

The  statement in the sway configuration file will accept a   parameter to adjust the scaling of the high resolution display.

OpenRC
If using ConsoleKit (OpenRC), run Sway using:

systemd
When using Systemd or Elogind Sway can be launched with:

Other
Systems that are configured with neither systemd, elogind, nor ConsoleKit, will need to create a bash script (or use some other means) to set the XDG_RUNTIME_DIR variable.

The environment variable can be defined in the usual configuration files. For example, if sets XDG_RUNTIME_DIR variable in his Bash shell's configuration file and he has chosen that the directory will be in.

With the XDG_RUNTIME_DIR defined, sway can be launched as usual:

If issues are encountered check Sway issues on GitHub before contacting the Sway community on IRC or opening a new Gentoo bug.

Usage
All key combinations will be defined in the configuration file.

The 'logo' key is defined as the  value by default. On most keyboards this will be the Windows key.

Movement
Sway has a Vi-like interface. (left), (down),  (up), and  (right) can be used for movement.

See for more information.

Terminal
The default key combination to open a terminal emulator is +.