HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mackstann
tinywm
C2020–2025
mackstann / tinywm

tinywm

The tiniest window manager.

8Distinct people
9Mentions
1Explicit recommenders
1.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The tiniest window manager.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

Hah. I didn't think this was quite HN worthy at this point - the code is still a mess, and has plenty of bugs. It is however the wm I actually use since I got frustrated with…

vidarh used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year9 dated mentions

Observed mentions: 2020-12-16 16:52:26 UTC to 2025-07-24 21:55:07 UTC.

012342020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC413

What Hacker News says

9 sources
> Nobody's requiring Wayland. Yet. Defaulting to it is one step on the path towards removing support for X and independent window managers forever. I deeply, deeply care about running an independent window manager. A minimal X window manager is a page of code: https://github.com/mackstann/tinywm/blob/master/tinywm.c (yes, plus xlib); a minimal Wayland compositor is tens of thousands of lines of code. > contrary to your statements, it's perfectly ready for prime time These comments are full of folks mentioning issues. Wayland does not support my window manager; thus it is demonstrably not ready for prime time for me. > Wayland is the way forward It may actually be. I’m not as opposed to Wayland as I may sound! But do you understand how you and other Wayland advocates sound — like advocates? ‘Wayland is the way forward’; ‘there's no f
Read the rest
uture for Xorg’; these things are arguably true, but they are also rather cruel to say (a bit like ‘inevitably you and everyone will die’: it really is true, but it’s also not at all a nice thing to say). I do think that Wayland or something very like it may be the way forward, but it needs to be an evolution, not a revolution. I know that the party line is that that’s not possible, but I suspect that rather than not possible it is just very hard. It’s always easier to greenfield, and it is always hell to be 100% backwards compatible. But that’s what it needs to be.
In Fedora Workstation 41 to No Longer Install Gnome X.org Session by Default
vidarh·Jan 22, 2024Recommendation phrase
Hah. I didn't think this was quite HN worthy at this point - the code is still a mess, and has plenty of bugs. It is however the wm I actually use since I got frustrated with bspwm and did a very minimalist rewrite of TinyWM [1] in Ruby [2] and expanded it from there. It was painful the first few days until I'd had time to add multiple desktops and the start of a tiling mode. But at this point, it's "almost" pleasant for me. The warnings are real, though, apart from the initial hyperbole - this is likely to break for you in all kinds of horrible ways still. [EDIT2: As for a real example of the ways it can/will break: Right now, for some reason, after a restart without changing a single line, it's failing to grab super+buttons to move/resize windows; it doesn't really matter as I have keybindings for it and mostly use those, but, yeah, I'm
Read the rest
doing something wrong somewhere and last time this happened the problem just went away by itself] I use very few applications beyond (my own) terminal, (my own) polybar replacement, (my own) file manager, and a browser, and so once Chrome and my own apps mostly started working ok I've had very little incentive to make sure it behaves nicely with anything else and I know the distinction between different EWMH window types is incomplete and broken - just not in ways that usually affect my own use. EDIT: Also a couple of quick notes on "design choices" to the extent this has been "designed" rather than accreted: As you can see in e.g. desktop.rb, quite a few places I've chosen to query and filter the top-level WindowManager class for a list of windows matching a given set of criteria. I did that on an experimental basis out of the idea that it was a waste of time to track precise state across multiple objects given that the total set of windows will always remain "small". So the Window objects know the bare minimum state of the underlying X11 window that it needs to track, and the WindowManager class knows how to map an X11 window id to a Window object. Other than that I avoid tracking state as much as possible, and even where I track state I try to avoid the need for full precision. The one other place I must track state is the layout classes. Currently, only the basic tiling layout, which keeps a tree (that is currently a binary tree, but the array of nodes is there because I at one point thought I might allow more nodes) where the leaves keep track of which nodes have a defined place in the layout. But even there, on updating the layout, I then crudely diff the currently known set of windows vs. the set of windows the layout believes are present and remove/add as needed. I make a best effort to place new windows on map requests, but if anything breaks for any reason, the layout will "catch" up automatically and new windows will be placed. Given I use this daily while it is in flux and often broken because I've made a change and is testing it "live" on my desktop, this has turned out to be very helpful on occasion. I can't make up my mind if this method (of constantly querying for attributes of every window) is a crude hack or quite elegant, but it works. Many other things are not "designed". This is mostly very far from a good example of how to actually do things. E.g. "find_closest" used to pick a window to move to when you want to move directionally in a tiling layout is pretty much guaranteed to be possible to do much better with fewer lines of code once I actually get around to sitting down and thinking about it - the current version was cobbled together in a hurry because I was tired of not having the functionality and it "mostly works" as expected even though it's stupid. [1] https://github.com/mackstann/tinywm/blob/master/tinywm.c [2] https://gist.github.com/vidarh/1cdbfcdf3cfd8d25a247243963e55...
In RubyWM – an X11 window manager in pure Ruby
This is a great article and I remember reading it numerous times while I was implementing my own window manager. For someone interested in working on a really fun and rewarding hobby project a WM is a great one to look into since there are so many resources starting from really small implementations: - https://github.com/mackstann/tinywm - https://github.com/venam/2bwm - https://github.com/dylanaraps/sowm - https://github.com/dcat/swm - https://github.com/JLErvin/berry Which are great at introducing the concepts and allowing you to grok the required libraries. To larger more full featured packed window managers which will introduce you to more advanced topics: - https://github.com/baskerville/bspwm - https://github.com/herbstluftwm/herbstluftwm - https://www.nongnu.org/ratpoison/ - https://github.com/conformal/spectrwm Gradually as you ge
Read the rest
t more familiar with the ecosystem a few questions will come up: Should I use X11 or XCB? - I personally used XCB and didn't find it too difficult to interface with, and there are a large number of implementations which use it (2bwm, bspwm, ratpoison, etc) so you shouldn't have an issue with learning more about it. But the documentation is pretty limited. If you are just wanting to write a toy WM than X11 is perfectly fine. X or Wayland? - If you're wanting to write your first WM as a hobby project than I would recommend X over wayland just due to the much larger amount of reference material and documentation. You will have a much easier time getting your feet wet. Ignore the comments about X dying as it doesn't really matter for a hobby project, since the whole point is to have fun. Feel free to check out my window manager which is an example of what just reading this blog post and getting inspired can result in: https://github.com/cfrank/natwm
In How X Window Managers Work, and How to Write One (2014)
> The ability for one window to float over another was a later innovation and is of course more difficult to implement. I find it funny, because I would say I have seen more floating window manager, when I was browsing GitHub, so I assume it is also quite easy to create a new one from scratch. Such floating VMs usually have 200-1000 LOC and die after 1 month after initial commit. Recently, xwm has been on HN [0] and it is small in terms of SLOC. There is smaller one called tinywm[1]. When we would compare them to i3[2] and sway, we can see they have thousand times larger codebase but they also bring a lot more features. I keep my fingers crossed for more sophisticated WMs like PaperWM[3], which is "tiled scrollable window manager" to take off. They might synthesize ideas from floating and tiling managers and provide a better tool to manag
Read the rest
In I3: Improved Tiling Window Manager

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.