Mahogany
Mahogany is a tiling window manager for Wayland modeled after StumpWM. While it is not a drop-in replacement for stumpwm, stumpwm users should be very comfortable with Mahogany. Its planned features are:
- Easy extensibility: through the use of different modes, users can modify keybindings present in Mahogany.
- Module system that allows users to load and use code at their discretion.
- Programs to interact with other running services such as pulseaudio and alsamixer, as well as facilities to control screen brightness. These are module based, so they don’t have to be loaded if your system doesn’t use them.
- Good support for floating windows.
- A configuration system using Common Lisp.
This branch contains a version of Mahogany using a backend written in C. The old version written entirely in Common Lisp can be found in the full-cl-old branch.
Building
There are two parts to Mahogany: a backend library implemented in C, and the Common Lisp front end. Thus, you will need the following tools:
- A C compiler (tested with GCC and clang)
- Steel Bank Common Lisp
- GNU Make
- Meson
Several dependencies are shipped with Mahogany as git submodules. To download them, run the following git command:
git submodule init
Backend Library Dependencies
The backend library requires wlroots 0.15.1. This version is included as a git submodule and is used by default. It requires the following development dependencies to build:
- wayland
- wayland-protocols
- EGL and GLESv2 (optional, for the GLES2 renderer)
- Vulkan loader, headers and glslang (optional, for the Vulkan renderer)
- libdrm
- GBM
- libinput (optional, for the libinput backend)
- xkbcommon
- udev
- pixman
- [libseat]
You will need the development packages for these libraries, which
are usually named with the packages’ normal name with the -devel
suffix. For example, the Wayland protocols development package is probably
named wayland-protocols-devel
in your package repository.
While it is possible to use a prebuilt version of wlroots installed by
other means, it is currently not supported by directly invoking make
like these instructions suggest.
Common Lisp Dependencies
You will need a Common Lisp implementation. While it should run on any version that the CFFI library supports, sbcl is recommended.
The recommended way to install the dependencies is using Quicklisp. Follow the instructions at https://www.quicklisp.org/ to install it.
Once downloaded, install the dependencies:
(ql:quickload '("alexandria" "cl-ansi-text" "terminfo"
"snakes" "iterate" "cffi" "cffi-grovel" "closer-mop"))
Building And Running
At this point, all of the dependencies should be installed. You can
now run make
in the root directory of the project to build the C
backend and the mahogany executable.
make
# if success, run the program!
make run
# Can also do:
LD_LIBRARY_PATH=build/lib64:build/lib ./build/mahogany
If you want to build mahogany (or execute any of the other build commands) with CCL, you can do so by specifying CCL when invoking make:
make LISP=ccl
It is possible to run mahogany in an X11 or Wayland session, and is
the recommended method of testing at this time. If you do choose to
run the program in a TTY, press the ESC
key to exit.