This is a very simple reparenting, non-compositing X window manager that demonstrates how to implement the fundamental functionality of a window manager:
- Managing the life cycle of windows
- Reparenting windows
- Basic window operations (moving, resizing, closing)
To build this example window manager, you will need:
- A C++-11 enabled C++ compiler
- SCons
- Xlib headers and libraries
- google-glog library
To run and test it, you will need:
- Xephyr
xinit
- Random X utilities such as
xclock
,xeyes
, andxterm
to play with
On Arch Linux, you can install these with:
yaourt -S base-devel scons xproto google-glog \
xorg-server-xephyr xorg-xinit xorg-xclock xorg-xeyes xterm
Consult your own distro's documentation for how to install these.
Once you have all the dependencies, building and running it is as simple as:
./build_and_run.sh
This will launch a simple Xephyr session like in the following screenshot:
Supported keyboard shortcuts:
- Alt + Left Click: Move window
- Alt + Right Click: Resize window
- Alt + F4: Close window
- Alt + Tab: Switch window