Linux Format

TinyWm, a learning tool

-

TinyWM only contains 50 lines of C-code, the code depends on Xlib and calls very few functions, creating a binary smaller than most. The code is on http://incise.org/tinywm.html with one version with annotation­s and one without, the code is also on GitHub. The descriptio­n is very thorough, detailing possible pitfalls when programmin­g for X. Cases covered are resizing to extreme values; how to handle lag of different kinds and how to handle key bindings.

Written by Nick Welch, the functional­ity is limited to four basic window functions:

1 Move Windows interactiv­ely, using the Alt+Button1, the left mouse button.

2 Resize windows interactiv­ely, using the Alt+Button3, the right mouse button. 3 Raise windows, using Alt+F1. 4 Focus windows with the mouse pointer.

The list, as you can see, is very short which gives you an excellent reference point for getting started if you want to develop in X. So if you are starting out, it’s a good idea to read the code and implement a new function to get you started.

The project has been forked to create many other window managers, e.g. smallWM. With such a small codebase it was inevitable that many ports would show up based on TinyWM. With ports to Java, Python, Ruby, etc, you can use this package to get started with many different languages.

Newspapers in English

Newspapers from Australia