Overview
Wmderland is an X11 Tiling Window Manager that represents the windows as the leaves of a tree.
It aims to simplify the core functionalities of i3wm, which features a more approachable config system, and bundle in the essential features required for a modern but minimal Tiling Window Manager.
Written in C++ using Xlib
Why Another WM
I started this project because I want experience with OOP in C++ and Xlib. I know there's already lots of WM out there, but I'm writing this for my personal use and study.
Internal Data Structures
Please note that "Clients" are the windows that are managed by our WM.
In Wmderland, clients are represented as the leaves of a tree, while the internal nodes tell the split direction of its children. The root node always exists with the client tree (it WON'T and MUSTN'T be deleted). The clients are arranged (tiled) recursively.
The following illustration shows how Wmderland stores its clients, where R is the root node, V means its children must be tiled vertically, H means its children must be tiled horizontally.
R R R
/ / \
---> 1 ---> 1 2
^ ^
+-----------------------+ +-----------------------+ +-----------------------+
| | | | | | |
| | | | | | |
| | | | | | |
| R | | 1 | | 1 | 2 |
| | | ^ | | | ^ |
| | | | | | |
| | | | | | |
+-----------------------+ +-----------------------+ +-----------------------+
Empty Spawn 1 Spawn 2
R R R
/|\ /|\ /|\
1 2 3 ---> 1 2 V ---> 1 2 V
^ / \ / \
3 4 3 H
^ / \
4 5
^
+-----------------------+ +-----------------------+ +-----------------------+
| | | | | | | | | | | |
| | | | | | | 3 | | | | 3 |
| | | | | | | | | | | |
| 1 | 2 | 3 | | 1 | 2 |-------| | 1 | 2 |-------|
| | | ^ | | | | | | | | | |
| | | | | | | 4 | | | | 4 | 5 |
| | | | | | | ^ | | | | | ^ |
+-----------------------+ +-----------------------+ +-----------------------+
Spawn 3 $Mod+V and Spawn 4 $Mod+G and Spawn 5
- For the Tree API, see tree.cc and tree_node.cc
- For the Tiling Algorithm, see workspace.cc
Build Requirements
- g++ (requires C++11)
- CMake
- Xlib headers
- Optional - glog (Google's C++ logging library)
CMake will determine if your machine have glog installed. If compiled and linked with glog, you can find the log files under /tmp/Wmderland.*
Installation
- Run build.sh and install
$ chmod u+x build.sh && ./build.sh
$ sudo make install
- Copy the config file (IMPORTANT)
$ mkdir -p ~/.config/Wmderland
$ cp example/config ~/.config/Wmderland/.
- Append the following lines to your ~/.xinitrc
# Fix Non-reparenting window managers / Grey window /
# Programs not drawing properly
export _JAVA_AWT_WM_NONREPARENTING=1
# Startup Wmderland
exec Wmderland
- Initialize an X session
$ startx
Main Features
- Tree-based horizontal and vertical tiling (like in i3wm)
- Gaps and borders
- Static workspaces
- Smart floating (dialog windows will be floating by default)
- Easy-to-use config with runtime reload support
- Supports a subset of EWMH, see
src/properties.cpp - Remembers the positions/sizes of floating windows (~/.local/share/Wmderland/cookie)
Compatibility with WINE
Most WINE applications should work fine, except the following bugs:
WINE applications will hang on closefixed in commita816f31- WINE Steam floating menu windows are slightly laggy when closed
- WINE Steam startup logo window is not correctly resized
Todo List
- Add support for sxhkd
- Web browser windows should go fullscreen as video goes fullscreen
- Rounded corners
- Two borders
Other Screenshots
Special Thanks
- Markus Elfring for giving me lots of helpful advice
- Airblader's i3wm
- suckless.org's dwm
- jichu4n's basic_wm
- baskerville's bspwm
- mil's simple_wm
- JLErvin's berry
- Mr messyhair's eveningwm
License
Available under the MIT License

