Skip to content
🌱 A tiling window manager using space partitioning tree, featuring an easy-to-use configuration system
Branch: master
Clone or download
aesophor cookie: change cookie location and bug fix
* Change cookie location to ~/.cache/Wmderland/cookie
* Fix a bug where cookie file is not properly written
Latest commit 7214e0b May 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.meta reorganized project structure Feb 24, 2019
cmake corrected conditional compilation and linking Feb 11, 2019
example update example config Feb 24, 2019
src cookie: change cookie location and bug fix May 2, 2019
.gitignore updated .gitignore Feb 28, 2019
CMakeLists.txt update version number Apr 2, 2019
LICENSE update LICENSE Mar 2, 2019
README.md
build.sh

README.md

Wmderland

Project started in NTUOSC Hackathon 2018

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
         

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

  1. Run build.sh and install
$ chmod u+x build.sh && ./build.sh
$ sudo make install
  1. Copy the config file (IMPORTANT)
$ mkdir -p ~/.config/Wmderland
$ cp example/config ~/.config/Wmderland/.
  1. 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
  1. 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 close fixed in commit a816f31
  • 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

Floating windows

Special Thanks

License

Available under the MIT License

You can’t perform that action at this time.