Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A tiling window manager like i3wm written entirely in C# (github.com/lars-berger)
121 points by toothbrush6 on April 16, 2022 | hide | past | favorite | 35 comments



The github description (which clarifies that the project is intended for windows users) would be a better title.

> A tiling window manager for Windows inspired by i3 and Polybar.


You're completely right. Can't seem to change it this late after posting though.


I have grown to like tiling and think it is the future of desktop computing, if there really is one, even though it is an older paradigm. The ability to automate and set up workflows and maximize on screen space is great.

I've been having trouble lately finding a good launcher/menu. I use Wayland, so I want to use something Wayland native but I wind up sticking with dmenu because the Wayland alternatives don't quite work right. You can't index aliases, .desktop files and PATH at the same time (aliases are a problem with dmenu too), and you can't just run commands. A wlroots launcher that can handle all of these things would be fantastic, bonus points if it can pop out a terminal for TUI applications.


Tiling is too esoteric to be the future of desktop computing IMO. Luckily that doesn't matter, and the people who enjoy it can use it while others can continue to use stacking WMs or whatever else people might prefer.


It's already how phones work by default, more or less. One app is fullscreen, and the ability to split the screen up came later so you can have two side-by-side.


bemenu works fairly well for me on Sway. Your limitations may be correct and my usage just differs. I do also use it in scripts and bind some of them to other keys, like for a clipboard manager or a menu to pick from other scripts, or a menu to pick from common programs to focus by class/appid via swaymsg command.

wofi looked slick but is really slow due to gtk limitations, and it might even be abandoned now.


What is the license?

I am author of Stack WM [1]. Also C#, but all the configuration and layouts are defined in WPF XAML and are generally static (e.g. like PowerToys, but much more flexible due to WPF containers and data binding + you can make WPF-based widgets).

Curious about the license for I am interested in having a common library for window manipulation. I am using VirtualDesktop [2] to handle Windows desktops, and it needs some love.

[1]: https://losttech.software/stack.html

[2]: https://github.com/losttech/VirtualDesktop


Currently there's no license, but looking to add one ASAP.

Your project looks really cool, but unfortunately I'd be looking to limit distribution of the software for profit. GPL seems like it'd be the most appropriate, but I'm by no means an expert on this stuff.


GPL by itself allows anyone to use the software for free, for both personal and commercial purposes.


Interesting. What happens if someone were to yoink part of the code for their own project (either personal or commercial)? Would they then have to open source that project under GPL?

It might just be overthinking on my part, but it'd be a shame to somehow negatively affect the Windows customization community. There's so many paid desktop customization tools out there for Windows and many of the most prominent ricing tools are closed source.


Disclaimer: I am not a lawyer. While what I have written below is likely to be all correct, take it with a grain of salt.

Releasing the source code under GPL implies that if all or part of the code is taken, integrated into another application, and that application is redistributed, then the source code of the application must also be made available under GPL.

Note that:

1. GPL is not distinguishing personal and commercial. However, those selling applications may not want to release their code. Hence, they may not want to integrate GPL code into their application.

2. If someone compiles your code into a binary (or just gets it from you), they may use it for both commercial or personal purposes. GPL is not coming into action here as it was applied to the source code, which hasn't been modified in this case.

3. GPL clicks on redistribution. So if someone has integrated GPL code into their application, however, are using that application for themselves only, or within their company (which is considered a single entity; distribution within a company would not qualify as redistribution), GPL does not come into play. Likewise (not applicable to your case), if someone is using the application only on their servers in the cloud and only serving output to the customers, they are not redistributing the application itself. This, in a manner of speaking, defeats the purpose of GPL in the cloud world, and is sometimes called the server loophole. Alternative licenses like AGPL are more suited against this.

4. If what you are truly looking to do is to make money by selling your application, you may consider not releasing the code openly at all (you can still delete the code if you like prior to attaching an explicit license; once released under GPL or another license, someone can legally copy before you take back). There are alternative ways where dual licensing is used, etc.

I did not understand your second paragraph to be able to comment much. It seems that you are worried that your releasing this as free (or FOSS) would negatively impact sales of similar existing third-party commercial applications.

If I understood correctly (else, please ignore the rest of my comment), while of course the choice is yours, this is a common scenario. Various producers are to be in a healthy competition to serve the consumers. So if a producer can provide the same value to the consumers for less, that would be considered improved economic efficiency.

The challenge usually is that lower quality stuff shows up in the market for cheaper, impacting the market for better quality higher price. This itself is also OK as such, for if the quality is lowered too much, the consumers may naturally prefer the costlier product. However, challenges still result for various reasons.


First of all, thanks for the detailed explanation. It's helped clear up my concerns. Will have to do a bit more reading, but GPL sounds like it'd be a good choice.

I should've clarified to mean the open-source Windows community in my earlier comment.


You can always have different parts under different licenses.


I used i3wm for 5 years. I still miss it after switching to the new MBP 3 months ago. Using mouse to manage spaces is so tedious and wastes 2-3 seconds each time, which added up quickly throughout the day.


I was also a die hard i3wm fan who started using MacOS on a new job.

I am currently a (mostly) happy user of Yabai. There's some blog posts from folks who made the same transition, lemme know if end up taking a look and still have questions, and I'll try to answer them.


Try BetterTouchTool or Magnet. Magnet's UI is a little nicer, but that doesn't really matter since you'll never see after you've set it up. I prefer BetterTouchTool because the shortcut keys are more flexible. Perhaps you can match the i3wm keys to leverage that existing muscle memory.


Do you know about Amethyst? I've been told it's not as fast as i3 but I'm a happy user.

https://github.com/ianyh/Amethyst


I tried it, it just wasn’t for me. I liked i3 because it was so simple and intuitive. I didn’t need to think, it was all muscle memory.


What about Rectangle? When moving from i3 in Linux to Mac I tried Amethyst for a while but switched to Rectangle soon after and have used it since.

Still haven't found anything truly comparable to i3, though.


I really like Fancy Zones from PowerToys[1]. [1] https://github.com/microsoft/PowerToys


Used to use FZ but it relies on the user to move windows around. More of a passive window manager.

I've been using komorebi[1] but it's rather clunky with the ahk dependency. I'll have to try Glaze and give it a spin.

[1]: https://github.com/LGUG2Z/komorebi


Yeah exactly, FancyZones feels like a bit of an upgrade over the built-in tiling (eg. with Win+Left/Right). It doesn't quite compare to keyboard-driven TWMs like i3 and bspwm.


komorebi dev here. I can't tell you the number of times I've wanted to just write my own take on sxhkd[1] for Windows and use that to manage my own keybindings for komorebi instead of ahk.

You can just as easily write your own/use another hotkey daemon or PowerShell scripts to handle komorebi's configuration and keybindings, in that sense there is no dependency on ahk at all. However, the inertia around ahk in the Windows ecosystem is undeniable and it's in the interests of making adoption and onboarding easier that the project provides example ahk files and has invested in an ahk code generation library.

My thoughts on the dominant hotkey daemon in the Windows ecosystem aside, I remain convinced that the famous bspwm socket communication architecture[2] is the best way to handle both configuration and keybindings for a tiling window manager that has been proposed to this day.

Unfortunately I have to concede that there is a certain configuration burden that comes with komorebi, which is amplified in some cases by having to write/maintain ahk. This configuration burden is largely due to the highly fragmented nature of Windows application development that is discussed often on HN and it is inescapable.

With this in mind, the next release of komorebi (currently available on master) will invest even more heavily in automatic configuration generation.

A separate repository of common application-specific configuration tweaks[3] (in YAML!) has been created which I and others from the komorebi Discord server are contributing to, with the goal of having the edge cases for as many applications as possible fully documented so that a comprehensive configuration file can be generated[4] for the user which ensures that every (major) Windows application behaves as expected under a tiling window manager.

I hope that other Windows tiling window manager developers can use these YAML definitions in the future to handle the same edge cases in their projects so that eventually there will be a tiling window manager of every flavour (bspwm, i3wm etc.) available for Windows users where having to manually accommodate and compensate for the non-standard behaviour of individual applications is a thing of the past.

[1]: https://github.com/baskerville/sxhkd

[2]: https://github.com/baskerville/bspwm#description

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

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


Thank you for your work. I definitely think it's much better than most solutions out there. I was exploring trying to get it to work with espanso[1] (also written in Rust) but haven't had much time.

[1]: https://espanso.org/


From [4] in the command given to generate the common application configurations `komorebic.exe ahk-app-specific-configuration applications.yaml`, the argument `ahk-app-specific-configuration` doesn't exist in the latest release version, v0.1.8.


v0.1.9 coming soon (TM)! This[1] is the readme for v0.1.8.

If you want to try out the new features coming in v0.1.9 (including this one), you can follow the build steps from the readme on the master branch or download a zip containing the compiled binaries of the latest development build[2] by clicking on the green "tick" icon next to the latest commit and downloading the "komorebi-x86_64-pc-windows-msvc" artifact.

[1]: https://github.com/LGUG2Z/komorebi/tree/v0.1.8

[2]: https://github.com/LGUG2Z/komorebi/actions/runs/2192874049


When saying "using the build in DWM" he does not refer to the suckless DWM, right? I would be surprised when the buildin WSL would include suckless DWM and actually power the tilting.

How an operating system named and based on windows never had a sane window manager of beyond me.

https://dwm.suckless.org/


Desktop Window Manager (DWM) is the name of the built-in window manager for Windows


Thanks for this, this is wonderful. I used to use bug.n for tiling, but it was terribly slow and buggy most of the time- haven't tried any other solutions since.


I love i3wm and am continually surprised that they never integrated the gaps fork.

Does anyone know of a good tiling wm for Mac?


There is only one that’s good enough to disable animations and takes control over the desktop: Yabai


Not quite the same thing but I've been using Rectangle. It doesn't automatically tile windows but does give you control over window size and placement using the keyboard.


Amethyst


GlazeWM_x64.exe 154 MB

microsoft gotta be microsoft, bloat everything it touches


Nice to have some c# submissions.

Looks interesting. Thanks for sharing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: