Trying Wayland

By chimo on (updated on )

Let me preface this by saying that I don't particularly dislike X11. I've used it for years, it did a pretty good job of getting out of the way, and most of the time I'm not really thinking about it.

I've been stumbling on more and more articles and mentions about Wayland, however, and so I've decided to try to use Wayland, and applications running on Wayland exclusively. For this experiment, I consider XWayland cheating, so I disabled it in my Sway configs.

It's been working pretty well so far. Now granted, I have pretty simple needs. I run most things in the terminal, and then I need a browser because you kind of have to nowadays.

Window Manager

The biggest push for me to start this experiment was hearing about Sway, a drop-in replacement for the i3 window manager. Given that i3 was the window manager I was running on X11, this seemed like an obvious choice. Sway, along with sway-bar, have been working very well.

On X11, I was also using xautolock to lock my screen after a period of inactivity. This has been replaced with swaylock. This only thing I'm missing from xautolock is the ability to prevent auto-locking by placing your mouse cursor in a corner of your screen (ex: top-right). This might be something that swaylock supports, but I haven't looked into it very hard.

Terminal

On X11, I was using st. On Wayland, I use wterm, which is an xterm replacement based on an st fork using wld alacritty since I eventually ran into a few issues with wterm.

Browser

I arbitrarily alternate between the following two browsers:

qutebrowser works on Wayland if you start it with the QT_QPA_PLATFORM=wayland environment variable. You can get rid of the window decorations by using the QT_WAYLAND_DISABLE_WINDOWDECORATION=1 environment variable as well.

Firefox Nightly will use Wayland if you start it with the GDK_BACKEND environment variable set to "wayland".

PDF Viewer

Firefox can open PDF files just fine, but I prefer my application with minimal window decorations so on X11 I was using xpdf. On Wayland, I use Zathura. This is a faily recent addition to my Wayland tools, and I try to avoid PDFs as much as possible, so my experience with Zathura is limited. It worked well the few times I used it though.

Image Viewer

In the same vein as the PDF Viewer, I was using feh as an image viewer. On Wayland, I use imv.

Screenshot Tool

I replaced scrot with grim. It doesn't seem to have a `--delay` option like `scrot` does, but doing `sleep 5 && grim screenshot.png` works just as well.

Password Manager

pass-wl-clipboard. This is pass, but patched with Wayland clipboard support. I'm using this package until the patch lands in an official release.

As a related side-note, I'm using wl-clipboard instead of xclip to manage clipboard content from the CLI.

Notifications

mako is in charge of displaying notifications.

Issues

I've been running this setup for a least a month now and I ran in to very few issues so far. The only thing I can think of at the moment is copy/pasting from wterm to firefox doesn't work or pastes symbols I don't understand (Google says it's Chinese, but won't translate it oddly enough). It's not a big deal for me so I haven't investigated the issue further yet.