Tiny-wlhs, a hybrid haskell and C Wayland compositor

Update - Addition of Keybindings

Hi all, this post and thread will likely be a mix between devlog and announcements.

This weekend keybindings was added to Tiny-wlhs which is a key milestone on the path to getting something that can be used as a daily driver.

You can see a short demo on the README GitHub - l-Shane-l/tiny-wlhs: A Wayland compositor written in Haskell, providing a configurable and programmable window management system. This project implements the TinyWL reference compositor with Haskell bindings, allowing for dynamic configuration and control through Haskell.

Besides adding the key bindings support I restructured the project to make it easier to use. Now you can configure everything from the Config.hs file

This also is documented in the Readme.

Basic Usage

Default key bindings:

Mod + Left Click: Move window
Mod + Right Click: Resize window
Mod + Esc or Alt + C: Close server
Mod + s: Open new terminal (configurable, default: kitty)
Mod + d or Mod + v or Mod + F1: Cycle between windows

And of course all of these can be configured in Config.hs

Try it out

git clone --recurse-submodules https://github.com/l-Shane-l/tiny-wlhs.git
nix-shell  # Or use direnv: direnv allow
cabal run

Notes on the key bindings

I would have liked to use something like xkbcommon, however the bindings seem to be out of date(10 years i think) and the nix pkg broken. This is actually a nice project for anyone who was interested. It will likely be needed for any Wayland Haskell bindings.

Next steps

Window management is the next thing I want to address, some basic tiling would go a long way (for me at least) to start using this as a daily driver.

Beyond that I think multi-monitor support and integrating something like bemenu would be a real step forward, and must have features.

I’m pretty happy with the progress so far and I will likely post here next when I have something to show for the window management. :slightly_smiling_face:

15 Likes