Moving to Sway

screenshot Color scheeme uses Solarized colors from awesome work of orgiginal author Ethan Schoonover and other contributors. Wallpaper in the background is awesome work of haven1

In previous posts you will notice that I was using i3 on Arch Linux as my daily driver. However, with the recent (and very slow) shift from X to Wayland in Linux world, I have decided to start moving my workflow to Sway, which as the website claims: “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.”

This is quite important to me, because as many others I have spent hours configuring i3 and adjusting it to my needs. And I feel pretty comfortable now with tiling manager.

The migration was quite simple and I could keep most of my i3 config. Although whole i3 config file would work, I have decided to convert some stuff to “sway way”. On my day to day basis I use my laptop with external sceen connected to it, but it is positioned above my laptop screen. In i3 the config looked like this:

exec_always --no-startup-id xrandr --output HDMI2 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output DP1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x1080 --rotate normal --output VIRTUAL1 --off

Where as in sway it is:

output HDMI-A-2 pos 0 0 res 1920x1080
output eDP-1 pos 0 1080 res 1920x1080

If you ask me, it is much cleaner and easier to understand. There were few other differences that make sway much cleaner and easier to work with.

There was another main requirement. Currently as of time of writing Polybar does not support Wayland so the bar panel had to be replaced. I went with Waybar. It’s easy to configure, it is in active development and you can even style it with CSS :D but as you can see from the screenshot above I was actually removing some parts of the CSS to make the panel more minimal.

The big problem with moving to sway may be to some, that not all applications or drivers work on Wayland yet. I am personally using Intel graphics that support Wayland, and all my development programs work. So appart from compton compositor nothing was stopping me from moving. I eventually decided to go without drop shadows and transparrency, but those features I belive will come in quite soon with Wayland and sway development.

Here are dotfiles for interested ones.