Skip to content(if available)orjump to list(if available)

Show HN: A Tiling Window Manager for Windows, Written in Janet

Show HN: A Tiling Window Manager for Windows, Written in Janet

111 comments

·May 20, 2025

Hi HN!

I read[1] about Janet[2] some time ago, then immediately got impressed by the enthusiasm of its community, and by the language itself, so I started playing with it.

At the time I was searching for a tiling window manager for Windows, and unavoidably the idea of scratching my own itch with Janet got hold of me, so Jwno was born.

Simply put, Jwno is a keyboard-driven tiling window manager for Windows, scriptable with Janet. But since it has a complete Lisp runtime, and a thin wrapper library for Win32 APIs[3], you can certainly do much more with it.

I hope you'll enjoy playing with it as much as I enjoyed building it.

And yes, I use StumpWM on the Linux side, by the way.

[1]: https://ianthehenry.com/posts/why-janet/

[2]: https://janet-lang.org/

[3]: https://github.com/agent-kilo/jw32

rich_sasha

I'm curious, did you find there were things that were easier to do because it's Janet/lisp-like language? Or you just fancied like using it (perfectly valid reason of course!).

I tried various lisp dialects, but I could never find the killer feature vs other languages I already use. And I can justify why I use these specific languages I do use, if that makes sense.

agentkilo

I find the REPL and interactive development workflow invaluable. A window manager is a long-running background service by nature, and has a lot of accumulated runtime states. The ability to peek inside and debug while the process keeps running helped me a lot when building Jwno.

I think Jwno's REPL module is so important, I specifically changed Jwno's architecture at one point to make it work.

behnamoh

> I find the REPL and interactive development workflow invaluable. A window manager is a long-running background service by nature, and has a lot of accumulated runtime states. The ability to peek inside and debug while the process keeps running helped me a lot when building Jwno.

Sure, but any particular reason you picked Janet over Common Lisp? They both support images, REPL, hot-code-reloading, etc.

agentkilo

TBH I dived right in when I decided I should build something with Janet, and didn't really consider any alternatives. Now you mentioned it, I think Janet's simplicity and conciseness played a large part in attracting me to it, comparing to Common Lisp at least.

netbioserror

Janet being a tiny embeddable runtime similar to Lua probably makes it perfect for a use-case like this. You have a full language, standard library, and interpreter in ~1 MB, along with the ability to bundle the runtime with your scripts into one binary. That's worth a lot.

postdoc74

I am not familiar with Janet but have been a long time lisp developer. Could you perhaps add a few lines to the readme explaining how the build process for jwno works? Would love to give it a try, understand how it works and hack around :)

iLemming

> I could never find the killer feature vs other languages I already use.

You're kidding or trolling? Structural editing and the REPL are the greatest features of Lisp. The ability to just grab any expression and move it around simplifies so many things when coding and refactoring. With the connected REPL you can eval anything on the spot, that turns the entire experience of coding into a video game — you don't need to wait for linter, linker, compiler — you just run things. You often don't even have to save anything. I suspect when you "tried various lisp dialects" maybe you didn't use structural editing and the connected REPL?

Often people confuse Lisp REPL with REPLs in other programming languages, e.g. Python, where usually you have to copy-n-paste chunks of code into it. Lisp's REPLs are different in the sense that every step in Read-Eval-Print-Loop is different — in Lisp, you typically eval things right where you type them, by sending whole expressions to the connected REPL, which could be remote. We (for example) run ours in a Kubernetes cluster, that allows us to experiment with pods, running queries against the "real" DB tables, testing services "live".

joshjob42

I have only just begun my road down lisp, from starting to hack some elisp and working with some CL for fun. But structural editing is turning out to rapidly be my favorite feature, to the point that I'm working in my personal time on a lisp (syntax? language? idk haven't exactly decided) on top of Julia (my preferred language) so that I can use structural editing. The ability to just grab and drop entire expressions and advance through code by expression at a given level of the tree or up and down it is just really really nice.

There already is a LispSyntax.jl but it's sort of trying to be a Clojure clone and I don't care for it, haha.

iLemming

I know, right? I honestly have no idea how the heck did I even code before in non-lispy languages. I imagine if I had to pair-program with someone today it would go like: "hey, how do I grab this part of the function quickly, so I can move it out?"... "Wait, what? I have to manually select it, there's no quick way of doing that with a single keystroke? Oh, I can use this 'powerful refactoring' feature of the IDE? Huh... and it only works for this specific language, there's nothing for a different one? Got it, okay... daaaarn... and I thought the coding supposed to be the easy part of programming..."

90s_dev

> You can implement custom commands and hooks to trigger. It's even possible to call native Win32 APIs in your own implementations. For example, to always move a Notepad window to the (100, 100) coordinates on your screen(s), using the low-level SetWindowPos function

Great job. Looks really interesting and useful. And a fun excuse to write Lisp.

I really appreciate it when APIs give you high-level functionality but keep the door open to lower-level APIs when you really need them.

once_inc

My experiences with tiling window managers is that they struggle in judging a modal screen like a confirmation box or detachable/dockable mini-containers like the interface of certain programs like GIMP. Considering those as new tile-able windows tends to be a hinderance instead of increasing productivity.

roflmaostc

I use AwesomeWM on Linux since over ten years.

For example, GIMP works without any issues. And the productivity boost is tremendous, for me it's very hard to work on anything else. I barely encounter programs where it does more harm than use.

Especially having multiple desktops with different names allow me to localize windows so much quicker than looking through a dozens of terminals manually.

Right now, I do have: 1 mail, 2 web, 3 gimp, 4 chat, 5 notes, 6 terminal, 7 ssh cluster

3036e4

They do struggle with that, or rather some developers struggle with not making assumptions about the way a user's window manager is laying out their windows?

I use StumpWM, and for the few applications that this becomes a real problem it is possible to run those in a floating windows group that works just like a minimalistic non-tiling window manager. I think this is a common features of tiling window managers.

aus10d

Janet looks really neat. And this project seems really cool. Windows DESPERATELY needs a more powerful built-in manager. It's ridiculous to use the mouse all the time.

Rasthor

One of the later PowerToys updates makes the first few steps in the right direction with "fancy zones". It's not strictly native windows, but still developed by Microsoft and adds keyboard shortcuts for all its utilities

TeMPOraL

PowerToys seems to be making two step forward, one step backwards, and then makes a leap in a random off-axis direction. Every time an update comes, I feel both joy and worry - I expect to see some new cool thing (and possibly even useful to me), but I also worry about bloat and random performance degradations. I haven't bothered with measuring and quantifying it properly, but I do feel PowerToys got heavier and slower over the last 2 years.

Ironically, 90% of use I get from them is remapping Caps Lock to CTRL. Which I historically did with AutoHotkey, which was much lighter, but then there's the 10% of the time I need something else from PowerToys...

layer8

The even simpler solution to remapping Caps Lock is to use SharpKeys, which applies registry settings to make use of Windows’ built-in remapping functionality.

nemomarx

Even lighter than autohotkey is remapping on the hardware of the keyboard. There's a lot of open source firmware options for that now in the custom scene

jazzyjackson

I never use the mouse to move windows around, windows key + arrows key meets my needs fine even multi-monitor, breaks the screen up into halves and quarters. Alt-tab to change focus.

behnamoh

> Windows DESPERATELY needs a more powerful built-in manager. It's ridiculous to use the mouse all the time.

And yet, I find Windows window management far more advanced than macOS. It's ridiculous that up until recently, macOS didn't even have basic max-size functionality w/o reaching for 3rd party apps.

weeb

This looks to have great potential for accessibility! I work with individuals who use eye gaze input, where a significant part of the screen is taken up by an on-screen keyboard (including various shortcut/macro keys as well as for typing). Having tiling options that fit within a smaller part of the screen (e.g. still allow side by side or top/bottom split, but in a smaller total region) would be great. Particularly as Windows 11 has broken vertical docking of appbars.

The UI hints also look promising, but I can't get them working. Using example-config.janet I tried pressing RAlt or RAlt+K and I get the UI hint shortcuts list coming up, but none of them seem to do anything, except in Notepad where I sometimes get the standard UI hints (that always come up here with a long press of left alt)

Fwiw, as a newbie I found it a bit intimidating/off-putting that it doesn't work out the box without choosing a config file. That's quite a lot of extra cognitive effort and link-clicking before you can try it out. And I'm left quite unsure what I'm missing out on. Am I able to access the different documented features with the config file I have? It's not clear.

agentkilo

> Having tiling options that fit within a smaller part of the screen (e.g. still allow side by side or top/bottom split, but in a smaller total region) would be great.

Do you mean reserving screen space for the on-screen keyboard? If that's the case, you can try to "transform" the top-level frame (a frame that tracks a monitor's screen area), either in the REPL or in your config: https://agent-kilo.github.io/jwno/cookbook/adjust-top-level-...

> Using example-config.janet I tried pressing RAlt or RAlt+K and I get the UI hint shortcuts list coming up, but none of them seem to do anything

Can you please file a bug report and attach relevant logs? You can write logs to a file by starting Jwno like this:

jwno.exe --log-file C:\jwno.log --log-level debug --no-console your-config.janet

There should be some interesting logs when you press one of the UI hint shortcuts.

> Fwiw, as a newbie I found it a bit intimidating/off-putting that it doesn't work out the box without choosing a config file. That's quite a lot of extra cognitive effort and link-clicking before you can try it out.

I totally understand. But I chose to not include a default config in the executable, because I thought a window manager is a... personal thing. It should evolve with your habits and workflows, so the default config will most likely get changed to something dramatically different anyway. I can be wrong though.

weeb

Yes! transforming the top level frame sounds like the way to go.

I ran jwno with example-config and pressed RAlt and RAlt+K a few times, each time trying one of the onscreen shortcut keys (b, c, d, etc). Log at the bottom of this comment. At the end of the process I was left in a state where pressing Space triggered a context menu in my title bar, and I couldn't type space in the app (e.g. in Notepad or Terminal) which I think is due to one of the Alts ending up being held down? It persisted after leaving Jwno

Log: https://ctxt.io/2/AAB4W5O7Fg

agentkilo

It seems your right alt key is actually the AltGr key. I didn't explicitly support AltGr in Jwno, so it freaked out.

Sorry for the confusion. I think switching to another leader key, such as LAlt or RCtrl, should fix the issue.

agentkilo

Thanks! I created a tracking issue here: https://github.com/agent-kilo/jwno/issues/12

Meanwhile you can try to change leading `RAlt` to something else, like `Win + H`, and see if it works. There may be a bug that gets triggered when only modifier keys are mapped.

iLemming

Whoa, very cool. I love WMs, I love Lisp, and I hate Windows. This seems to be a perfect "medicine" for my frustration with it.

avindrag

That UI hinting feature is killer. Is something similar available outside of this repo?

accrual

I agree, it's impressive. It brings me back to early Windows when keyboard control was a first class citizen in the UI, and most functions had dedicated alt key combos per dialog.

bsnnkv

Jwno is great, agentkilo is kind, Lisp is magic :)

agentkilo

Thanks for the kind words! It means a lot coming from you :)

I_complete_me

This means something to me that one dev recognizes another and gives them kudos. I applaud this positive behaviour. You'd never get that from the AI monsters. But of course, now you probably will. Sorry, everyone.

alpb

It's not a tiling manager but slightly related: I replicated Spectacle/Rectangle (macOS apps) on Windows a while ago to snap windows to edges/corners/two-thirds/one-thirds etc a while back. If you're interested: https://github.com/ahmetb/RectangleWin/blob/main/README.md

videogreg93

I love Rectangle, will definetly check this out!

TeMPOraL

Long-time StumpWM user, before I switched back to Windows a few years ago. This is super-exciting to see, and I'm going to take it for a spin. It might just address my major frustrations with arranging windows and switching between them; my monitor seems just the right shape/resolution for the standard Windows splits to be suboptimal.

(Browsers, in particular, I use full-screen less and less. That annoying trend of squeezing everything into short lines "because readability" is just wasting too much screen space; zooming in makes everything too big, and I'm getting tired of writing userstyles or userscript to fix it for every other page I open, so I'm back to keeping 2 or 3 columns of windows running.)

Also, any excuse to use more Lisp is good in my book. Based on the screenshots, it looks stellar; if it works half as well as it comes across, I'll switch over instantly.

agentkilo

A fellow StumpWM user!

My StumpWM is heavily customized though, and I mostly modeled Jwno's behavior after my own config, so it may not be what you expected at all.

But that's one of the reasons I like Lisp and things built in Lisp: They are so flexible, you can sometimes build something based on the original thing, while it feels completely different from the original.

> my monitor seems just the right shape/resolution for the standard Windows splits to be suboptimal

Do you use an ultra-wide? In that case, Jwno has no OOTB ultra-wide support, but there's a section for adjusting it in the cookbook[1].

[1]: https://agent-kilo.github.io/jwno/cookbook/adjust-top-level-...

TeMPOraL

> Do you use an ultra-wide? In that case, Jwno has no OOTB ultra-wide support

Actually no, I'm using two regular, 16:19, 2560x1440 screens. It's more that my understanding of readability does not agree with what designers think, and when I split the screen in half, many pages end up with text a little too small for my comfort, and if zoom in to compensate, the lines get slightly too short or horizontal scrollbar appears.

(I'd guess it's probably my somewhat strong myopia glasses that are getting me "out of alignment" from average user when it comes to text size and line length preferences.)

> but there's a section for adjusting it in the cookbook[1].

Lovely!

FWIW, I took it for a spin briefly (only briefly - had work to finish, but I plan on getting back to it) and I was pleasantly surprised by how good it is, and how well it handles Windows quirks. It feels nicer than StumpWM did back when I used it. The only thing that didn't work well was VLC - it does something weird with recreating its window when switching between videos, and in the process, it "breaks out of confinement" and ends up returning to original size and position it had before Jwno took custody of it.

entropie

I recently tried hyprland after using xmonad for like 10+ years and wondered about the decision to bind workspaces to displays. I didnt like that. How does Jwno handle multiple monitors? I have looked at the docs and didnt see it mention anywhere.

agentkilo

Sorry for the confusion. Multi-monitor support is only briefly mentioned in the docs[1] and the interactive tutorial[2].

Jwno's internal data structure has these levels (higher-level comes first):

Root - Virtual Desktops - Monitors - Normal Frames - Windows

So monitors are part of a virtual desktop, and every virtual desktop has the same layout that reflects your physical monitor arrangement. When you switch virtual desktops, all monitors switch to the new desktop at the same time.

[1]:https://agent-kilo.github.io/jwno/frame-tree/frame-nodes.htm...

[2]: https://github.com/agent-kilo/jwno/blob/master/example/tutor...

pona-a

What kinds of automation are possible with having a scripting language inside your WM, rather than Sway-style IPC? I heard the new Windows WMs were where most pure workflow advances happen, so I wonder if they can be replicated on Linux.