A Wayland compositor written in Common Lisp
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets Implement cairo-surface loading from png image May 1, 2017
.gitignore Update build files and README to suggest building without releases Jul 4, 2018
LICENSE Create LICENSE Oct 12, 2016
README.md Update to README (with animation) Jul 10, 2018
alt-tab-mode.lisp
animation.lisp Added ianimatable. Cursors now no longer animation on first commit. w… Jan 22, 2017
backend.lisp Support EGL Jul 24, 2018
build-ulubis-sdl.lisp Adds screenshotting capabilities. Jul 5, 2018
build-ulubis.lisp Adds screenshotting capabilities. Jul 5, 2018
cairo-surface.lisp
client.lisp More updates. Still weston-terminal still not working. Jan 20, 2017
compositor.lisp
desktop-mode.lisp Some more clean up and refactoring Jul 15, 2018
documentation.org More work on documentation Jul 11, 2018
ianimatable.lisp Added ianimatable. Cursors now no longer animation on first commit. w… Jan 22, 2017
install.lisp This is a working copy post-that-bug-which-caused-drm-not-to-exit. I … Oct 23, 2016
keyboard.lisp Major refactoring. Jul 9, 2018
mode.lisp Add a print-object method for key-binding Jul 10, 2018
mouse.lisp Major refactoring. Jul 9, 2018
package.lisp Back to using def-wl-bind but retain the even more stripped down bind… Jan 21, 2017
render.lisp Support EGL Jul 24, 2018
screenshot.lisp Fixed screenshot rgb order Jul 8, 2018
slide-and-edit.gif Update to README (with animation) Jul 10, 2018
surface.lisp Some more clean up and refactoring Jul 15, 2018
syscall.lisp - DRM rendering now uses drmModePageFlip for smooth tear-free renderi… Nov 18, 2016
ulubis.asd Fixes #31 Jul 15, 2018
ulubis.gif Added .gif for README Oct 15, 2016
ulubis.lisp Support EGL Jul 24, 2018
view.lisp Major refactoring. Jul 9, 2018
virtual-desktop-mode.lisp Update animation Jul 10, 2018
wallpaper.lisp Support EGL Jul 24, 2018
wl-compositor-impl.lisp I suspect the code is okay but there is some issue with weston-termin… Jan 22, 2017
wl-data-device-impl.lisp More updates. Still weston-terminal still not working. Jan 20, 2017
wl-data-device-manager-impl.lisp I suspect the code is okay but there is some issue with weston-termin… Jan 22, 2017
wl-data-source-impl.lisp More updates. Still weston-terminal still not working. Jan 20, 2017
wl-keyboard-impl.lisp First commit of major refactor. plumbing.lisp replace by -impl.lisp f… Jan 19, 2017
wl-output-impl.lisp I suspect the code is okay but there is some issue with weston-termin… Jan 22, 2017
wl-pointer-impl.lisp Added ianimatable. Cursors now no longer animation on first commit. w… Jan 22, 2017
wl-region-impl.lisp More updates. Still weston-terminal still not working. Jan 20, 2017
wl-seat-impl.lisp Support EGL Jul 24, 2018
wl-shell-impl.lisp Fix more (current-view *compositor*) bugs Jul 10, 2018
wl-shell-surface-impl.lisp Fix for subsurfaces (cheese wasn't showing video) and weston-presenta… Jan 23, 2017
wl-subcompositor-impl.lisp Fix for subsurfaces (cheese wasn't showing video) and weston-presenta… Jan 23, 2017
wl-subsurface-impl.lisp Need to reverse subsurfaces so they are drawn in the correct order (s… Jan 23, 2017
wl-surface-impl.lisp Major refactoring. Jul 9, 2018
xdg-shell-impl.lisp Fix more (current-view *compositor*) bugs Jul 10, 2018
xdg-surface-impl.lisp activate wasn't returning the surface as required. Fixed. Jan 22, 2017
zxdg-popup-v6-impl.lisp Fixes #31 Jul 15, 2018
zxdg-positioner-v6-impl.lisp Fixes #31 Jul 15, 2018
zxdg-shell-v6-impl.lisp Fixes #31 Jul 15, 2018
zxdg-surface-v6-impl.lisp Fixes #31 Jul 15, 2018
zxdg-toplevel-v6-impl.lisp Finally support resizing from borders Jul 15, 2018

README.md

Ulubis

Join the chat at https://gitter.im/ulubis/Lobby

Ulubis in action

Ulubis is a Wayland compositor written in Common Lisp. It is inspired by FVWM and StumpWM. The idea is that it is easy to hack on, customise, define your own interaction modes, etc. (see alt-tab-mode.lisp as an example of defining a custom mode)

Using SLIME you can connect to the running compositor and modify its behaviour live.

SLIME

(I currently call it a compositor intentionally...let's get a bit more window management functionality in before calling it a WM)

Installation of ulubis

  • Ensure you have SBCL or CCL and Quicklisp installed.
  • Build ulubis / ulubis-sdl
git clone https://github.com/malcolmstill/ulubis.git
cd ulubis
sbcl --eval '(load "build-ulubis.lisp")'

or

sbcl --eval '(load "build-ulubis-sdl.lisp")'

If quicklisp complains about not finding the dependencies it's because I don't have it in the official distribution. To get around that add clone the dependency (e.g. cl-drm) to the local-projects dir of quicklisp.

Running ulubis

To run ulubis the user must be a member of the input and video groups. Navigate to a virtual terminal and run

> ulubis

For the SDL2 backend simply run ulubis-sdl when in X.

Configuration

Ulubis looks for the file ~/.ulubis.lisp and loads it if it exists.

An example configuration is as follows:

(in-package :ulubis)

(if (string-equal (symbol-name ulubis-backend:backend-name) "backend-drm-gbm")
    (progn
      (setf (screen-width *compositor*) 1920)
      (setf (screen-height *compositor*) 1080))
    (progn
      (setf (screen-width *compositor*) 1400)
      (setf (screen-height *compositor*) 900)))

(set-keymap *compositor* "evdev" "apple" "gb" "" "")

(defun startup ()
  (swank-loader:init)
  (swank:create-server :port 4005 :style :spawn :dont-close t)
  (swank:set-package "ULUBIS")

  ;; Make the default screen
  (make-screen 'virtual-desktop-mode)
  ;; Add 4 views (virtual desktops) using the desktop-mode as default
  (loop :for i :from 0 :to 3
     :do (push-view 'desktop-mode))
  (setf (active-surface (screen *compositor*))
	(first (surfaces (screen *compositor*)))))

Hacking on ulubis

Download ulubis and its dependencies to quicklisp's local-projects/ dir and hack away, rebuilding the executables as per installation.

Contributors

All glory to our lovely contributors, please join us:

  • naryl very kindly added a nicer cursor using cairo
  • cbaggers very kindly updated various bits and pieces to use the latest CEPL tech

Status

Ulubis is known to work with sbcl and ccl. I have only tested it on two machines which Intel graphics chips, please get in touch if it does / doesn't work with Nvidia or AMD cards. It is very alpha.

Roadmap

The vague roadmap for ulubis is as follows (not necessarily in order):

  • Add screenshotting
  • Wallpapers
  • Add (an at least rudimentary) menu system
  • Server-side decorations
  • Add screen locking
  • Add video capture
  • Support multiple monitors
  • Support more Wayland clients (a web browser would be very nice)
  • XWayland support
  • Potentially define custom Wayland protocols for ulubis (maybe you want to replace a built-in menu with your own menu written in QML)

Dependencies

Ulubis depends on:

Ulubis has two backends: ulubis-sdl (an SDL2 backend) and ulubis-drm-gbm (a DRM/GBM backend). The DRM/GBM backend is intended to be the backend whilst the SDL2 is intended for testing on X.

The DRM/GBM backend depends on:

The dependencies for the SDL2 backend are: