To give you a very rough idea of the difficulty of this exercise: I did this inĤ or 5 hours this morning and last night, producing the window manager you see The window manager documentation and examples I found were for the Xlib C library. I personally found C easier to use because a lot of If you’re not comfortable writing C, there are also libraries that let you work the dwm source code (dwm is a 2000-line-of-C window manager).I found it really helpful when debugging. xtrace lets you trace all requests to the X windows system that your window manager is making.I compiled my window manager with gcc bouncewm.c -g -o bouncewm -lX11 and ran it with env DISPLAY=:1.You can start an xterm in the Xephyr desktop with xterm -display :1.I ran it like this: Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 & Xephyr lets you embed an X session in a window in your regular desktop, so that you can develop your toy window manager without breaking your usual desktop.I did this challenge by modifying tinywm and it worked really well. There’s a Python version of tinywm too, but I wasn’t able to get it to work. This is a GREAT starting point and there’sĪn annotated version of the source code which explains a lot of the details. Writing a window manager from scratch seems intimidating (at first I didn’tĮven know how to start!). It turns out implementing this kind of toy window manager is surprisingly approachable! the setup: start with tinywmĪll the instructions here only work on Linux (since this is about writing a Linux window manager).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |