I want to make a window manager in either of these languages (Preferably ruby). I honestly have no idea where to start except that I will need some kind of X module to load. So if anyone has a clue it would be great if you could point me in the right direction. Thanks
XCB, the next gen API for X uses an XML format to define X protocols and generates specific language bindings with a script. It's similar in concept to SWIG except that instead of describing C APIs, it describes X protocols.
Currently, bindings exist for C and Python. A Ruby port would theoretically be only a matter of writing a translator from the XML protocol definition language to Ruby. The generated Ruby code could either wrap the C API or implement the wire protocol in pure Ruby (I recommend the latter).
The API apparently has some inherent advantages over the legacy Xlib related to blocking I/O. It also has a Windows port, oddly enough.
http://xcb.freedesktop.org/
http://xcb.freedesktop.org//XcbPythonBinding/
http://xcb.freedesktop.org//win32port/
Have you looked at http://ruby-xlib-wrap.sourceforge.net/. This appears to provide Ruby bindings for XLib.
You may want to experiment with using XWindows before trying to write a window manager.
Why not start with a desktop, so you can get some experience.
Note:
1) Awesome is not written in lua, it's written in C. It uses Lua as a scripting/config interface.
2) Qtile and Samurai-X are two wm's are written in python.
3) Subtle is a wm that uses ruby as a scripting language.
Qtile and Subtle are both tiling window managers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With