Sway

From Void Linux Wiki
Revision as of 14:04, 5 September 2019 by Jeok (talk | contribs) (Fixed small (but crucial for newcomers) typo in symlink command.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sway is an actively developed i3-compatible tiling window manager for Wayland. While it still is a bit rough on the edges, it is suitable for every-day usage.

Installation

You can install sway using.

# xbps-install -S sway

If you want to run sway without setuid binary you have to build package with elogind option. To do it follow the Xbps-src guide and github documentation.

Steps should look like this:

$ git clone git://github.com/void-linux/void-packages.git
$ cd void-packages
$ ./xbps-src binary-bootstrap
$ ./xbps-src pkg sway -o elogind
$ sudo xbps-install --repository=hostdir/binpkgs sway

elogind also requires installation and setting up services:

# xbps-install -S elogind
# ln -s /etc/sv/dbus /var/service/

Usage

Get out of your X11 or Wayland session if you have any open, for example by pressing CTRL+ALT+F2 and logging in with your account. Then start sway with your preferred keyboard layout:

 $ XKB_DEFAULT_LAYOUT=de sway

Configuration

i3 config file should work with sway out of the box. You can just copy it to ~/.config/sway/config

If you want to start from scratch, copy the default config located at /etc/sway/config and start applying changes:

 $ mkdir -p ~/.config/sway
 $ cp /etc/sway/config ~/.config/sway/
 $ vi ~/.config/sway/config

for more information about config syntax and commands check out manpage

 $ man 5 sway

Troubleshooting

Input doesn't work (or Sway doesn't start at all)

Make sure, that your user is in the video group.

XWayland tooltips and menus get tiled like normal windows (Firefox, GTK2 programs, ...)

This is a known bug, but there is more information needed to fix it. Please help by addding information about your setup here.

See also