Skip to content

stumpwm/mahogany

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Contributing / Hacking

Mahogany is still in an early stage of development. See the list of milestones for features or work that is ready to be started. You can also browse the issue list for labels marked with Good First Issue.

In general, if it’s in stumpwm and you want it, we will consider adding it. Create an issue for the issue tracker so we can plan on how to get it done.

Before writing code, please look at CONTRIBUTING.md

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 update --init

To see a full example of this process, see the CI workflow.

Backend Library Dependencies

The backend library requires wlroots 0.19.x. If an appropriate version is not available, it will be built locally. See the README in the submodule or consult the project’s git repo for information on how to build it.

Common Lisp Dependencies

You will need a Common Lisp implementation. While it should run on any version that the CFFI library supports, SBCL and CCL are supported.

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" "adopt"
		  "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.

Getting Started

Mahogany is currently in a pre-alpha state. Help is needed (see list of milestones). In particular, touchscreen, menu, dialog, and systray do not work yet. But it has basic functionalities already.

Check the ./lisp/key-bindings.lisp for what you can do. For example, C-t c should fire up a terminal for you, and C-t q will kill mahogany. You can customize your keybindings by writing ~/.config/mahogany/init.lisp. For example, the following code lets you to open emacs by holding super and tapping on e.

(in-package #:mahogany-user)

(defun open-firefox (sequence seat)
  (declare (ignore sequence seat))
  (uiop:launch-program "firefox"))
(defun open-emacs (sequence seat)
  (declare (ignore sequence seat))
  (uiop:launch-program "emacsclient -c || emacs"))
(add-to-kmap *top-map*
  (kbd "s-e") #'open-emacs))
  (kbd "s-F") #'open-firefox)

To modify the keyboard layout with libxkb, see Doc: Keyboard Layout.

About

A stumpwm like Wayland compositor

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published