This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Sway
Sway (contracted from SirCmpwn's Wayland compositor) is an open-source Wayland compositor that is designed to be compatible with the i3 window manager.
Installation
USE flags
Emerge
root #
emerge --ask dev-libs/sway
Configuration
To view all available configuration options:
user $
man 5 sway
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 /etc/sway/config location:
user $
mkdir -p ~/.config/sway/
user $
cp /etc/sway/config ~/.config/sway/
Terminal emulator
By default the sway configuration file uses the urxvt terminal emulator (found in the x11-terms/rxvt-unicode package). It is a good idea to emerge this terminal emulator so that a terminal will be available once sway is running:
root #
emerge --ask x11-terms/rxvt-unicode
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:
user $
swaymsg -t get_outputs
The
swaymsg
USE flag must be enabled for the swaymsg command to be available on the system.The output
statement in the sway configuration file will accept a scale
parameter to adjust the scaling of the high resolution display.
Executing sway
Invoke sway
from TTY to execute sway WM.
If you use sys-auth/consolekit instead of systemd or elogind, run Sway using:
user $
exec ck-launch-session sway
If you encounter any issues check Troubleshooting before contacting #sway on IRC.
Usage
All most key combos will be defined in the ~/.config/sway/config configuration file.
The 'logo' key is defined as the $mod
value by default. On most keyboards this will be the Windows key.
Movement
Sway has a Vi-like interface. h (left), j (down), k (up), and l (right) can be used for movement.
See man 5 sway-input for more information.
Terminal
The default key-combo to open a terminal emulator is $mod+Enter.
See also
- i3 — a minimalist window manager, focusing on keyboard commands to manipulate windows.
- weston — a reference implementation of a Wayland compositor.