TinyWM – A tiny window manager in around 50 lines of C

By LaSombra - a day ago

Showing first level comment(s)

I think that the real advantage of something like this is that it provides a minimal template to follow if one wants to start writing a window manager in one's language of choice (assuming that language already has some X bindings). One can start from there, & then add ICCCM, tiles, whatever else one wants.

edit 1: accidentally a word

edit 2: I'm at a loss at why this isn't considered a contribution to the conversation. Can anyone enlighten me?

zeveb - a day ago

I ported this to go for fun 3 years ago: https://github.com/collinglass/tinywm

collinglass - a day ago

Spent some time trying to get this to run in a Xephyr window on an old ubuntu box, but it doesn't seem to be able to move windows or resize as advertised (whereas twm is fine, and xev sees all the keypresses).

These tiny projects are often cursed by having very few resources when something goes wrong.

Y_Y - a day ago

Finally, a window manager for people who find dwm bloated!

lunchables - a day ago

For anyone pondering minimal/unbloated window managers, checkout cwm [0][1]. I've been using it exclusively for quite some time now. It's quick to compile, has sane configuration and is the most ergonomic floating wm I've used. I don't see myself ever needing anything else, provided I don't see myself using a tiled wm.

[0] https://github.com/chneukirchen/cwm [1] https://man.openbsd.org/cwm.1

dmos62 - 18 hours ago

I wrote something like this once, and had maybe 3-4 applications that I wanted to use with it. mplayer was one of them, and it broke with my straightforward and absolutely reasonable window manager. It did display only a quarter of the movies since it thought the video window was fullscreen but it was only a quarter of the screen. The reason was a bug in mplayer's source code. It did not expect to be resized once and only once and being mapped only afterwards.

Another story, I've been an icewm user for many years and I absolutely loved it. But at some point the bitrot was too much. Windows that didn't gain focus because of newer unimplemented client<->WM protocols, clients that crashed for hard to debug reasons, and so on. There are still some patches being developed for icewm that try to make it work with some newer clients. And there are workarounds on top of workarounds for fighting with Java clients, but at some point I decided it was too buggy and switched.

Writing a window manager could be such a nice project if wouldn't mean implementing terrible but necessary protocols, and fighting with all the bad X11 clients out there.

jstimpfle - 16 hours ago

This reminds me of the mid-to-late 90s where everyone made their own window manager. You had the choice of 100s of them. But usually they lost interest after a version or two, and didn't implement much of the icccm.

danmg - 21 hours ago

I use a mix of wmutils[0] and windowchef[1] and they're great, lots of little programs (some < 10 LoC) but also some cool stuff like mouse support and borders etc. I've only ever had trouble with JAVA apps which is a simple fix (_JAVA_AWT_WM_NONREPARENTING=1)

This is a screenshot of my Linux desktop [2], I use these on OpenBSD as well without too much issue.

[0] https://github.com/wmutils [1] https://github.com/tudurom/windowchef [2] https://i.redd.it/ql1id3rocnq01.png

znedw - 14 hours ago

As far as I can tell, not ICCCM (nor EWMH/NetWM) compliant.

teddyh - a day ago

This was a reference for me while initially developing nobox: https://github.com/serprex/nobox/blob/master/nobox.c

__s - 11 hours ago