How X Window Managers Work, and How to Write One (2014)
This is a great article and I remember reading it numerous times while I was implementing my own window manager.<p>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:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;mackstann&#x2F;tinywm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mackstann&#x2F;tinywm</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;venam&#x2F;2bwm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;venam&#x2F;2bwm</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;dylanaraps&#x2F;sowm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dylanaraps&#x2F;sowm</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;dcat&#x2F;swm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dcat&#x2F;swm</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;JLErvin&#x2F;berry" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;JLErvin&#x2F;berry</a><p>Which are great at introducing the concepts and allowing you to grok the required libraries.<p>To larger more full featured packed window managers which will introduce you to more advanced topics:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;baskerville&#x2F;bspwm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;baskerville&#x2F;bspwm</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;herbstluftwm&#x2F;herbstluftwm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;herbstluftwm&#x2F;herbstluftwm</a><p>- <a href="https:&#x2F;&#x2F;www.nongnu.org&#x2F;ratpoison&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nongnu.org&#x2F;ratpoison&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;conformal&#x2F;spectrwm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;conformal&#x2F;spectrwm</a><p>Gradually as you get more familiar with the ecosystem a few questions will come up:<p>Should I use X11 or XCB? - I personally used XCB and didn&#x27;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&#x27;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.<p>X or Wayland? - If you&#x27;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&#x27;t really matter for a hobby project, since the whole point is to have fun.<p>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: <a href="https:&#x2F;&#x2F;github.com&#x2F;cfrank&#x2F;natwm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cfrank&#x2F;natwm</a>