What is SWAY?

The SWAY Window Manager (swaywm), is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3's features, plus a few extras.

SWAY in Debian

SWAY is not included in any of the official Debian installers and is not available in the main stable (Buster) repositories.

Installation from unstable and experimental

The following instruction have been test on Debian testing with an existing i3wm but it will work if you use something else (the configuration will just be a little more time consuming). Please check in your current repository before continue.

Add repositories and update package list

# echo 'deb http://ftp.debian.org/debian experimental main contrib non-free' > /etc/apt/sources.list.d/experimental.list
# echo 'deb http://ftp.debian.org/debian unstable main contrib non-free' > /etc/apt/sources.list.d/unstable.list
# apt update

Install requirement and sway

# apt-get -t unstable install swaybg
# apt-get -t experimental install sway 

Install more tools to feet your needs (lockscreen, screenshot) :

# apt install swayidle swaylock grim slurp

Please at this step not start your session on sway or you will probably be stuck. Do the configuration which permit to use mouse and essential keyboard shortcut.

Configuration

From i3

If like me you come from i3 you should first read the official (small) documentation.

So first you need to migrate existing files :

$ mkdir ~/.config/sway 
$ cp ~/.config/i3/config ~/.config/sway/config
$ cat ~.Xresources >> ~/.Xdefaults

At this point you need to edit your ~/.config/sway/config to migrate i3 stuff to sway one. It’s time to follow documentation.

You also have to had your keybord layout information.

$ swaymsg -t get_inputs

Can help you.

Add something like that in you the ~/.config/sway/config file.

 input * xkb_layout "us,de,ru"
 input * xkb_variant "colemak,,typewriter"
 input * xkb_options "grp:win_space_toggle"
 input "MANUFACTURER1 Keyboard" xkb_model "pc101"
 input "MANUFACTURER2 Keyboard" xkb_model "jp106"

and also

include /etc/sway/config.d/*

When it’s done you will disconnect yourself from i3 session and log back to sway. Maybe you have to fix some small issues.

From scratch

Not try myself but i think a good start is :

$ mkdir ~/.config/sway 
$ cp /etc/sway/config ~/.config/sway/config
$ cat ~.Xresources >> ~/.Xdefaults

More info

for more info you can check the sway wiki