Yukimi Devlog Part 1: Introduction!
A dive into my window manager written in Zig!
Hello and welcome to the first Yukimi devlog! This will be a series where I explain my progress and show you how Yukimi works. This part will be mostly an introduction to all of my plans, ideas and the state of Yukimi.
Quick introduction: I’m Dima, and you’re reading this article on my website. If you want to contact me about anything, feel free to do so! You can find the info on the about page .
I’ll try to keep this as interesting as possible, with screenshots and codeblocks, so you can hopefully learn something from this as well. And hopefully this will inspire and teach more people to try and build their own window manager. Lets get started!
Introduction
So what is Yukimi exactly? Well for starters, its a window manager, duh! But jokes aside, my main reason/motivation for writing Yukimi, was to learn how to do it and to find myself a decent i3wm alternative, that had some features that I was really missing from i3wm at the time. But things have changed quite a bit since I started the project. In the time that I partially abandoned Yukimi, I already switched over to Niri. And honestly, it’s perfect for me! I love everything about it. But the motivation to write my own window manager never really died.
So I sat down to think things over, how I wanted to make my window manager special, special to me and special to other people. What’s one thing that would be really cool to have, and no other window manager has?
After a while, I came up with the following list:
- I would like to be able to switch between regular tiling and scrolling, without headaches!
- I want a Built-in way to configure monitor sets for laptop users who often connect and disconnect a monitor
- I want a NixOS-first window manager support. This is a thing I never really see with window managers
- I would like to learn something from this! This goal stays as an important mission for me with this window manager
You can find Yukimi’s source on Codeberg , under YukimiDesu/Yukimi.
Current state
As you might have already understood, Yukimi has already been started. The codebase is decent enough, with most stuff being re-usable. But sadly, there is still a major stop-back from just resuming the work: it’s using XLib. But you might ask: What’s the issue? And well, there is none. XLib is nice in its own way, but I want to do this window manager right (at least for myself). While X11 isn’t necessarily bad in any way, I want it to be modern. And rewriting a huge codebase from X11 to Wayland, is well, a pain in the ass, that neither I, not many other people would like to avoid.
Even though my Wayland skills, heck even XLib/XCB skills are extremely lacking, I think in the end it would be worth it for me to struggle more now with learning Wayland over X11, so in the future, the projects wouldn’t need to go through a big setback (rewrite).
Apart from the XLib mess, I think I would be able to re-use most of the codebase flawlessly, if it’s gonna be required. I’m not yet sure if Yukimi is even following a healthy structure or not lol.
Next steps
First up, I’m gonna get myself familiarized with basic Wayland concept, and compositor concepts. This should give me a big enough head start, so that I can start my journey with wlroots. Yup, I’m going with wlroots for this one! If for why, it’s because I don’t see the necessity to actually build those modules from the ground up. Yes, that might offer me more performance and/or control, but it might also decrease the performance with my lacking Wayland skills. At my level, it will only make stuff worse. I’m sure someone experienced could do it, while also delivering a more performant result than with wlroots. But sadly, that isn’t me, at least not at this stage. Maybe someday lol.
But that aside, first few months will probably be basic commits, where I’m starting to rewrite everything, while also learning about more concepts. There will probably be a numerous amount of small rewrites in those commits, while I’m still getting a hang of it.
Conclusion
So yeah, this post was me explaining what I want Yukimi to become and how. This will definitely take a while, and I will try my best and document my progress weekly, here on this blog. Hopefully in the end, closer to the main release, this blog will be able to nicely document how Yukimi works, and will be able to teach or inspire people to build their own window manager. Thank you for reading, and have a nice day!
Written by a human, with a ton of mistakes :) If you find any mistakes, please report it here! This helps me to improve the quality of my blog, and my English!