Join us on our Discord server!
dwl is a compact, hackable compositor for Wayland based on wlroots. It is intended to fill the same space in the Wayland world that dwm does in X11, primarily in terms of philosophy, and secondarily in terms of functionality. Like dwm, dwl is:
config.h
dwl is not meant to provide every feature under the sun. Instead, like dwm, it sticks to features which are necessary, simple, and straightforward to implement given the base on which it is built. Implemented default features are:
Features under consideration (possibly as patches) are:
Feature non-goals include:
dwl has only two dependencies: wlroots 0.12 and wayland-protocols. Simply install these and run make
. If you wish to build against a Git version of wlroots, check out the wlroots-next branch.
To enable XWayland, you should also install xorg-xwayland and uncomment its flag in config.mk
.
All configuration is done by editing config.h
and recompiling, in the same manner as dwm. There is no way to separately restart the window manager in Wayland without restarting the entire display server, so any changes will take effect the next time dwl is executed.
As in the dwm community, we encourage users to share patches they have created. Check out the patches page on our wiki!
dwl can be run as-is, with no arguments. In an existing Wayland or X11 session, this will open a window to act as a virtual display. When run from a TTY, the Wayland server will take over the entire virtual terminal. Clients started by dwl will have WAYLAND_DISPLAY
set in their environment, and other clients can be started from outside the session by setting this variable accordingly.
You can also specify a startup program using the -s
option. The argument to this option will be run at startup as a shell command (using sh -c
) and can serve a similar function to .xinitrc
: starting a service manager or other startup applications. Unlike .xinitrc
, the display server will not shut down when this process terminates. Instead, as dwl is shutting down, it will send this process a SIGTERM and wait for it to terminate (if it hasn't already). This makes it ideal not only for initialization but also for execing into a user-level service manager like s6 or systemd --user
.
Note: Wayland requires a valid XDG_RUNTIME_DIR
, which is usually set up by a session manager such as elogind
or systemd-logind
. If your system doesn't do this automatically, you will need to configure it prior to launching dwl
, e.g.:
export XDG_RUNTIME_DIR=/tmp/xdg-runtime-$(id -u)
mkdir -p $XDG_RUNTIME_DIR
You can find a list of Wayland applications on the sway wiki.
dwl's IRC channel is #dwl on irc.freenode.net.
dwl began by extending the TinyWL example provided (CC0) by the sway/wlroots developers. This was made possible in many cases by looking at how sway accomplished something, then trying to do the same in as suckless a way as possible.
Many thanks to suckless.org and the dwm developers and community for the inspiration, and to the various contributors to the project, including: