top | item 33168263

Show HN: Komorebi – A tiling window manager for Windows 10/11 written in Rust

229 points| bsnnkv | 3 years ago |github.com

94 comments

order
[+] extr|3 years ago|reply
Komorebi works pretty well. In the end, I felt like it's limitations were mostly at the OS level rather than the fault of the software itself (similar to tiling WM on MacOs). I think for such a thing to really work, virtual desktops need to be a first class feature of the desktop environment. For Windows/Mac, they're still kind of janky. Whereas on Linux, I can bind Win+Tab to "Previous Desktop", hold down the button, and watch the screen flick between almost as fast as the refresh rate of the monitor. It really makes a laptop, with a small screen and with no additional monitors, a high productivity environment. Which is too bad, because the REST of Linux really sucks for laptops, with all the hardware-specific tweaks needed.
[+] bsnnkv|3 years ago|reply
I really appreciate this comment, I think it is spot on.

The official Win32 API for interacting with Virtual Desktops[1] is severely (deliberately?) lacking. There are some brave souls who are constantly reverse-engineering and figuring out how to interact with Virtual Desktops in all the ways that are missing from the official Win32 API, but this is a constant game of whack-a-mole because you never know when an update to Windows is going to break everything.[2]

If anyone working on the Virtual Desktops feature at Windows reads this: please give us a real, stable API for Virtual Desktops to develop against.

[1] https://learn.microsoft.com/en-us/windows/win32/api/shobjidl...

[2] https://github.com/MScholtes/VirtualDesktop/issues/35

[+] bscphil|3 years ago|reply
> the REST of Linux really sucks for laptops, with all the hardware-specific tweaks needed

Just to state the obvious, "hardware-specific tweaks" are hardware-specific. It is not hard, these days, to buy hardware where everything just works out of the box. It doesn't make sense to say that in general Linux sucks for laptops when what you're complaining about is a problem caused by your hardware.

[+] eyelidlessness|3 years ago|reply
I haven’t used a Linux desktop environment for many years now, so maybe there’s some nuance I’m not understanding, but virtual desktops have been a first class part of the macOS UI for many years. Swiping between them is only delayed by the default animation speed of that aspect of the window manager, and generally meant to match trackpad gestures and provide inertia consistent with other gestures.

Trying to understand how this relates to a tiling WM, I’m wondering if the virtual desktop in dedicated tiling WMs concept goes beyond multiple instances of the display and has arbitrary widths (or single dimension spaces)? That does sound nice for some ways I’d want a tiling WM, but it’s not what I’ve previously thought I’d want in one where I might have a grid with non-uniform x/y divisions.

Like it sounds very confusing to have a layout such as:

  a a b b c
  a a b b c
  a a d d e
And to treat anything besides `a` as a “desktop” even if they’re variable width.
[+] least|3 years ago|reply
Only fairly recently has Linux really seen much development of tiling WMs on top of things like Gnome and KDE. I know some of them can be run on top of XFCE and have for a while, but all of them fell similarly janky to ones on MacOS. It's only once you adopt something like i3, dwm, awesome, bspwm, xmonad, etc. that you get something that works as you'd hope in terms of spaces and tiling behavior.

The problem is that those window managers (in my opinion) is that they fail to do the basics well. You have to find the individual components like the bar if the WM comes with it and write your own scripts or hopefully find one that someone else wrote to get the things that are built into Gnome and KDE and work out of the box. You gotta set up your own notifications daemon. You need to configure how to launch applications through something like rofi or by configuring keybinds in your config. You need to configure your login windows. It can be enjoyable to a point but it can also just become really frustrating to deal with.

I think PopOS' tiling WM built on top of Gnome is pretty good but Gnome itself is frustrating trying to configure. KDE is highly configurable but its base configuration/experience is worse than Gnome.

The closest I've gotten to something that does both is replacing xfce's xfwm with i3 but ultimately it can easily break since it depends on turning off xfwm in sessions and making i3 an autolaunch item.

Linux is obviously the best for tiling WMs, but they have their own set of issues that traditional WMs on popular DEs in linux don't. Windows and MacOS have even more issues when attempting to implement them. I feel like there's just no winning here, regardless of what OS you're using.

[+] darthrupert|3 years ago|reply
Anecdote: my gaming laptop from 2022 doesn't work on Windows 10/11. It keeps hard crashing when stressed.

On Linux, it's totally stable on identical workloads.

Personally, I don't see reason anymore for the existence of Windows. For a long time it held its ground as a gaming OS, but Steam/Proton has taken that final advantage from it.

[+] orev|3 years ago|reply
In Windows 10 and 11, after you create another virtual desktop, you can easily move between them with built-in Win+Ctrl+Left/Right Arrow. It may not be as perfectly tuned as many would like, but it works well enough.
[+] Igrom|3 years ago|reply
>Whereas on Linux, I can bind Win+Tab to "Previous Desktop", hold down the button, and watch the screen flick between almost as fast as the refresh rate of the monitor. It really makes a laptop, with a small screen and with no additional monitors, a high productivity environment.

In my opinion, you have right there concisely expressed the real differentiator of using a Linux tiling WM. While I understand that there exist numerous incentives for adding animations to graphical user interfaces, such as increased consumer appeal and furnishing the computer program with a time interval in which it can (re)load data, I would also like user interface designers to consider that for some, speed really is paramount, really is second to nothing, and then that those would like to opt out of animations. I care not if the GUI freezes for half a second when switching into a different context, as long as it's lower than the one-second baseline delay introduced by the designer. This becomes so much more important when dealing with the operating system --- it's in use all the time, and the time spent waiting in it compounds and throws one off! It's the "No Child Left Behind", but for GUIs --- let's file down peak performance in order to obtain a more uniform result.

On Linux using i3, swapping your workspace costs exactly nothing. I often find myself rapidly and repeatedly switching to-and-fro between any two of them, as if I were performing a trill on a musical instrument, whenever I want to compare the output of two applications. The WM is my personal concierge there. In Mac OS, it feels like I'm stuck waiting in a crowded queue at the post office when there's only one tired and miserable worker around.

[+] suslik|3 years ago|reply
It is surprising to me that this and some of the subsequent comments view the state of tiling WMs on Mac unfavourably. I run i3gaps on my personal GNU/Linux machine and yabai with skhd at work, and both work equally fine in my experience (of course, it may as well be that my workflow does not rely on some critical piece of functionality that is not available for yabai).
[+] j1elo|3 years ago|reply
Offtopic but beautiful: komorebi is my favorite word in the category of "complex things in my language, for which other languages have a succint word", and in japanese it means the beams formed by light and shadows when sunlight shines through tree leaves
[+] bsnnkv|3 years ago|reply
My wife chose the name for the project, she is such a beautiful soul.
[+] sedatk|3 years ago|reply
We call them godrays.
[+] becquerel|3 years ago|reply
That's a very poetic translation, compared to jisho.org's 'sunlight filtering through trees '. It is also worth noting that it's a compound, not a single morpheme that represents the entire thought. (木漏れ日 - 木 is tree, 漏れ is 'filtering', 日 is sun/light)
[+] rochak|3 years ago|reply
Just looked up the meaning of the word. It is absolutely exquisite!
[+] swapsCAPS|3 years ago|reply
Tried Komorebi while running Windows and liked it a lot! Got too annoyed with Windows in general and went back to PopOS with tiling enabled. Would love to see PopOS’ intuitive window swapping/stacking in Komorebi one day
[+] raggi|3 years ago|reply
The almost-recursive screenshot in the README amused me
[+] zan2434|3 years ago|reply
:D Thanks for mentioning this! I hadn't noticed it and it is an amazing touch.
[+] qwerty456127|3 years ago|reply
Very nice although I feel perfectly happy with MS FancyZones.
[+] Klaster_1|3 years ago|reply
Been using FancyZones since the first version and as of late, I find that while basic features are great productivity boons, you still have to manage the windows and layouts manually. FancyZones needs an API to automate with, for example to switch layout when a specific window appears. Should not be too hard to add, just a bunch of command line arguments to call from AHK.
[+] brokenmachine|3 years ago|reply
I like FancyZones too, but it's all mouse-based.

You can't even bind a shortcut to send a window to a specific zone.

[+] quyleanh|3 years ago|reply
Same here.

For me, Windows must be used with mouse so Fancy Zones fits me well.

[+] LeonenTheDK|3 years ago|reply
Wow, this is the closest I've gotten to having i3 on not-Linux (even considering Fancy Zones/the built-in for Win11, and the MacOS tiling window managers I've tried).

After using i3, anything else for productivity just doesn't feel right for me, although I've made do. I'm excited to dig deeper into this and to make it work for me.

[+] naikrovek|3 years ago|reply
it’s amazing what people will do to get the tiling stuff i’ve had via an AutoHotKey script for … feels like a decade, but i don’t know how long i’ve had it. I didn’t come up with it, but i collaborated a little.

https://gist.github.com/naikrovek/b13a77d169de0e192bcf48fec0...

it’s designed for a single high res monitor (1440p or better) and multiple monitors aren’t supported at all. i haven’t added that because i don’t need that.

the Windows 11 mouseover-the-maximize/restore-button beats my thing on usability, though.

[+] bsnnkv|3 years ago|reply
For me, one of the biggest motivations in writing komorebi was that I wanted to separate the window management from the key binding and shortcuts using a message-passing architecture similar to bspwm and yabai.

By exposing all of the functionality (aka socket messages) via a cli (komorebic), I can use whatever I want to handle my shortcuts, which in turn makes it easy to configure my shortcuts to whatever I want. An added bonus is that exposing the functionality via the cli means that I can compose multiple commands to run sequentially with a single key bind.

[+] NaturalPhallacy|3 years ago|reply
I've been using Winsplit Revolution for years, and more recently MaxTo. Is there some reason to use this over one of those?
[+] bsnnkv|3 years ago|reply
If your workflow ain't broke, don't fix it. ;)

Honestly, this rabbit hole goes so deep. I started using Yabai on macOS, and when I switched to Windows, the experience of trying to interface with a computer without a tiling window manager was so frustrating that I had no alternative but to write my own tiling window manager (well actually I wrote two, komorebi is the second one).

[+] alpb|3 years ago|reply
Somewhat related: If you like hotkey-driven window tiling and positioning tools like macOS Spectre/Rectangle apps, I wrote https://github.com/ahmetb/RectangleWin for Windows a while back and mostly have been personally using it to position windows to 1/2, 1/3, or 2/3 of edges/corners of the display.
[+] bsnnkv|3 years ago|reply
I am also a Platform engineer by day and a very heavy user of kubectx, thank you for this excellent tool that has immeasurably improved my k8s workflow!
[+] hsbauauvhabzb|3 years ago|reply
I really like qtile under Linux. I don’t use windows regularly but would highly encourage an abstraction layer such that others can implement their own manager using your tiling abstraction layer. It sounds crazy but the ability to extend a wm is something a small set of users will use, but will be a great value to those users.
[+] sonovice|3 years ago|reply
Just to add one more to the conversation: I have found "FancyWM" to be a real productivity booster. For some reason it is pretty unknown, though.
[+] innocenat|3 years ago|reply
FancyWM is my go-to window manager for Windows. I have look at komorebi before, but it look very complicated to set up.
[+] mdpm|3 years ago|reply
Seconding this. It's seemingly unknown, but the most useable of those I've tried
[+] bogle|3 years ago|reply
If anyone has a good komorebi.ahk that sets up a sensible bunch of defaults then they should try to enhance the komorebi.sample.ahk that's in the repo. I found it had very few keys set up and some of the gists I found had errors in. This adds quite a bit of friction to starting with what looks like a pretty good workaround for the poor windows management in W10.
[+] rhodo|3 years ago|reply
Does anyone know how well it handles fullscreen applications like games? Would be nice to not tab out but switch to another workspace.
[+] bsnnkv|3 years ago|reply
I often play games on my computer with komorebi running, I just hit alt+p (my hotkey for `komorebic.exe toggle-pause` before I launch and again when I'm done.
[+] bsnnkv|3 years ago|reply
If anyone is interested, there are a couple of features that I developed based on my own needs that I have not seen in similar tiling window managers (including on other platforms):

* Rules to automatically change the layout depending on the number of windows on the screen[1]

* A custom layout definition format with an interactive custom layout generator[2]

* A subscription service so that applications that wish to do something with komorebi's state don't have to continuously poll[3]

* A frequently updated repository which contains configuration tweaks for problematic applications so that if someone fixes it once, it is fixed for good[4]

* A code generator that is able to consume the application-specific configuration tweaks mentioned in the last point and generate a valid configuration file[5]

* A more general library generator for the main configuration format preferred by the community[6]

Most interestingly for me, I used the subscription service to write an automatic application-aware keyboard layer-switcher[7], which means that I never have to store a key binding to switch between programmable keyboard layers ever again; whichever window I switch to with my tiling window manager, if there is an application-specific keyboard layer that I have defined with custom bindings or shortcuts etc specifically for that application, they get automatically applied without me even having to think about it.

It's such a huge productivity booster, a real "the future is now" moment for me personally.

[1] https://github.com/LGUG2Z/komorebi/#dynamically-changing-lay...

[2] https://lgug2z.github.io/komorebi-custom-layout-generator/

[3] https://github.com/LGUG2Z/komorebi/#window-manager-event-sub...

[4] https://github.com/LGUG2Z/komorebi-application-specific-conf...

[5] https://github.com/LGUG2Z/komorebi/#generating-common-applic...

[6] https://github.com/LGUG2Z/komorebi/#autohotkey-helper-librar...

[7] https://github.com/LGUG2Z/komokana

[+] im3w1l|3 years ago|reply
Screenshot looks like a physical window except the grilles are see-through and the glass is opaque. Very weird.
[+] fortyseven|3 years ago|reply
Sorry, I don't use software unless it's written in Fortran. :(
[+] ChrisClark|3 years ago|reply
Does it always just split the most recently opened window? Do you have to open them in a specific order to get the sizes you want? Browser first, terminal third, etc?
[+] philliphaydon|3 years ago|reply
Has anyone used the tiling in the new Windows 11 update? How does that compare?
[+] yellow_postit|3 years ago|reply
Haven't found any hotkeys, but for mouse-based it's nice and simple. My favorite is still Spectacle for MacOS, haven't found a perfect equivalent for Windows yet.