git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

scenefx/tinywl/README.md (1.6K)

 1 # TinyWL
 2 
 3 This is the "minimum viable product" Wayland compositor based on wlroots. It
 4 aims to implement a Wayland compositor in the fewest lines of code possible,
 5 while still supporting a reasonable set of features. Reading this code is the
 6 best starting point for anyone looking to build their own Wayland compositor
 7 based on wlroots.
 8 
 9 ## Building TinyWL
10 
11 TinyWL is disconnected from the main wlroots build system, in order to make it
12 easier to understand the build requirements for your own Wayland compositors.
13 Simply install the dependencies:
14 
15 - wlroots
16 - wayland-protocols
17 
18 And run `make`.
19 
20 ## Running TinyWL
21 
22 You can run TinyWL with `./tinywl`. In an existing Wayland or X11 session,
23 tinywl will open a Wayland or X11 window respectively to act as a virtual
24 display. You can then open Wayland windows by setting `WAYLAND_DISPLAY` to the
25 value shown in the logs. You can also run `./tinywl` from a TTY.
26 
27 In either case, you will likely want to specify `-s [cmd]` to run a command at
28 startup, such as a terminal emulator. This will be necessary to start any new
29 programs from within the compositor, as TinyWL does not support any custom
30 keybindings. TinyWL supports the following keybindings:
31 
32 - `Alt+Escape`: Terminate the compositor
33 - `Alt+F1`: Cycle between windows
34 
35 ## Limitations
36 
37 Notable omissions from TinyWL:
38 
39 - HiDPI support
40 - Any kind of configuration, e.g. output layout
41 - Any protocol other than xdg-shell (e.g. layer-shell, for
42   panels/taskbars/etc; or Xwayland, for proxied X11 windows)
43 - Optional protocols, e.g. screen capture, primary selection, virtual
44   keyboard, etc. Most of these are plug-and-play with wlroots, but they're
45   omitted for brevity.