Introducing RelayTerm
I missed using the XMonad window manager after moving to Wayland, so I made my own terminal emulator in Rakulang with GTK4 and VTE.
RelayTerm is meant to provide the terminal management from XMonad in a single application, specifically three features that I haven't seen in other terminals1:
- good mouse support, including focus-follows-mouse and easy copy/paste
- automatic tiling: terminals automatically get resized according to the layout (instead of declaring which terminal gets split in half, like many terminals)
- multiple "workspaces" of terminals, and the ability to move terminals between workspaces2
RelayTerm implements all three of these with a minimal user-interface. It's a Rakulang program with very few dependencies (raku and the VTE devel package). The name refers to how we re-apply layout the terminals when a terminal is created (or exits).
If the screenshot doesn't appear, view it on Codeberg.
Raku is a great choice for this project. Of course any high level language would make the layout logic easier to write than C but most of them don't have NativeCall, which makes it feasible to bind to GTK and VTE without other dependencies. Raku's grammars helped with parsing the config file. Then there's the little things, like the MAIN sub that's a lot easier to use than the glib application equivalent and the overall lack of segfaults.
You can try it out from https://codeberg.org/avuserow/relayterm.
When I evaluated this last, Kitty implements 1 and 2 but not 3 (and confusingly uses the term "windows" for what I call "panes", so searching for this feature is nigh-impossible). I have a very complicated tmux configuration that implements 2 and 3, but using tmux adds a layer of complexity everywhere.↩
This provides a straightforward path to useful multi-monitor support, where multiple windows of RelayTerm are running, each viewing a different workspace. I prototyped this in tmux and it works.↩