My Wayland Desktop

17.06.2019

A fancy Wayland Desktop

Recently I wrote about wanting to write my own Wayland compositor. I still plan on doing that, but for now I decided to simply contribute to an already existing project. I chose wio , a compositor that is intended to closely replicate the Rio, the windowing system of Plan9 and one of the very few mouse driven windowing systems that is actually useable and efficient.

Rio (and therefore also wio) uses a menu to invoke certain actions to manipulate window placement. The user can choose between "New", "Reshape", "Move", "Delete" and "Hide". "New" lets the user select an area of the screen, in which a new terminal will spawn. "Reshape" lets the user first select an open window and then an area of the screen to which the window will be moved and resized. "Move" is used to move open windows (obviously). "Delete" is used to close open windows and "Hide" can hide open windows. Hidden windows can also be found in the menu, where selecting them will open them again. "Hide" is not implemented in wio by the time of me writing this.

Another nice feature is swallowing. If one starts a graphical application, such as Gimp or Firefox, they will not open a new window but appear inside the same window that was previously occupied by the terminal.

I contributed a few patches to wio, but decided to fork the project because I want to do more then replicate Rio. My fork already does a few things differently. Besides changed defaults, one of the biggest change is that I implemented keybinds: The Super and Menu keys can be used instead of mouse buttons for all window operations. This is great for me, since my laptop does not have dedicated buttons. I also removed the "Hide" menu option, which was not implemented anyway. Instead I introduced "Tile" and "Fill". "Tile" will arrange and resize all open windows to not overlap and use as much space as possible (with small gaps between the windows). "Fill" will resize a window to the screen size and place it so that it covers the entire screen and acts as primitive fullscreen supports.

Generally I find this quite comfortable, but it is not without problems. Mainly, since swallowing is implemented by using another Wayland compositor as a container (cage) , which opens all windows fullscreen), there is basically no hope of having a shared clipboard. I might implement some hack by giving cage a keybind to write the clipboard contents to a common file and another one to import the contents of that file into the clipboard. I also could not find a status panel or launcher for Wayland. The only one that is currently existing (to my knowledge), waybar, depends on GTK and is therefore a no-go.