Hacker News new | comments | ask | show | jobs | submit login
Kwm, tiling window manager for OS X (github.com)
239 points by tbassetto on Dec 22, 2015 | hide | past | web | favorite | 73 comments



See also Spectacle: https://www.spectacleapp.com/

Maybe not the most configurable but in return you get something that works out of the box and doesn't require you to read 38 pages of README.


I'm a long time user of a similar tool called Divvy[1]. However both these tools are _not_ tiling window managers. They help us scale Windows manually by providing customizable shortcuts. A tiling window manager would take care of that automatically. Popular examples are i3[2] and XMonad[3].

As a user of both Linux and OSX, having no access to a real tiling WM is probably the biggest downside to me from an end users perspective.

1. https://mizage.com/divvy/

2. https://i3wm.org/

3. http://xmonad.org/


Divvy just works for me. Really, the two most common shortcuts I use are "take up the right half" and "take up the left half". That accounts for 80% of my usage of anything like a tiling window manager. In third place is an alternative for "maximize" which isn't the OS X maximize. (Has a use for certain legacy programs, and also as an alternative to OS X fullscreen.) The next two most common operations are "take up the top half" and "take up the bottom half."

The devs were pretty responsive to my request, as well.


I have the same use case; been using Spectacle for years now.


KWM looks like its actually hooking on the window creation event, so it functions like I3/ratpoison/xmonad/dwm/awesome/etc. I don't have a OS X machine to test it out (you'll pry Arch from my cold dead fingers, thank you very much), but it looks like the genuine deal compared to Divvy &co.


I use Divvy as well (on Windows). I wish there were a real tiling windows manager for Windows.


Just wanted to throw in a mention of Slate (https://github.com/jigish/slate) in here while we're talking about different options. I've been a happy user for a while now. Haven't tried the others, though.


Love slate, switched to it after ShiftIt went unmaintained a few years back, though it looks like ShiftIt is back in active development. Slate config is really nice, you'll feel at home if you are used to setting up vim or tmux configs.


Slate is the polar opposite of Spectacle. It's too much configuration for most people I'd say. I couldn't get it to work, and get back to my actual work in less than an hour so it was a non-starter for me.


I've used Spectacle for so long that I can't remember how it was to use OS X without it. The hotkeys are tied to my muscle memory, and don't clash with any of the stuff I care about (emacs, iTerm2, Chrome, etc).


Me too. It's awkward when I need to use someone else's Mac and it isn't there. I found some of the defaults did clash with iTerm, though. I use it mainly for toggling between full and half screens.


I know, especially the full screen shortcut.


Wow, me too exactly.


See also Bettertouchtool (http://www.boastr.net/).


There seems to be a lot of choice regarding very approachable windows managers for OSX these days. I throw in Magnet (http://magnet.crowdcafe.com).


huh, turns out there are way more options than I thought. I've been using SizeUp for a while, and am pretty happy with it.


KWM appears to offer significantly more funcionality than Spectacle, so a longer README is perhaps justified.


Isn't that... exactly what I typed?


I like the way he said it better.


Way more effective window tiling program than Amethyst IMO.


Worth mentioning Amethyst for OS X, I've been using it for a year with a 3 monitor setup with no problems.

https://ianyh.com/amethyst/ and https://github.com/puffnfresh/Honer.app


I'd be curious to know how this software compares with Amethyst. I've also been using Amethyst for some time with no problems, but it is sometimes a bit sluggish. I have so far assumed this has more to do with unavoidable limitations in the OS X gui ecosystem. It is written in Objective-C, is available on homebrewa and has a binary distribution available, provides a gui configuration manager, and seems to include all features claimed by kwm—including focus follows mouse. But if I knew how the two projects differ and, in particular, what kwm provides (or plans to provide) that Amethyst doesn't, I might consider giving it a shot.


At a guess, I would expect kwm to be faster, but probably less far along than Amethyst in terms of features/stability.

It's been a long time since I've actually written any C++, but briefly looking through the code it looks like it's making some of the same assumptions I made that resulted in some strange problems like the dreaded fullscreen bug (https://github.com/ianyh/Amethyst/issues/254). That said, some of those assumptions were made 3 OS X versions ago so things might have improved.

It does, however, look a lot lighter weight than Amethyst is, and it looks like it does a better job at aggressively caching. It also supports binary space partitioning, which Amethyst doesn't support yet (https://github.com/ianyh/Amethyst/issues/255). If I'm reading it correctly, though, that's the only thing it supports.

All in all, it seems like a great project. We could probably learn some things from each other, and I expect both projects would be the better for it.


It's not obvious from the Amethyst page that it's open source: https://github.com/ianyh/Amethyst (looks to be the MIT licence)


Yes, the license is an MIT license.


I use Amethyst everyday and it is excellent.


How does it compare to kwm?


I've not yet tried kwm so I am not really a good person to ask. In reading about kwm it seems to compare well to Amethyst in terms of features and use case goals. I've used Amethyst through several releases and seen a lot of improvement. If I had to make a real opinion all I could say is that Amethyst appears to be more mature (my assumption is that Amethyst has been around longer). I do like that the author reacts positively to feature requests and maintains a transparent development path: https://trello.com/b/cCg3xhlb/amethyst.

All of this said kwm looks promising and I think it is awesome more people are using tiling wm's.


This looks really similar to bspwm[1] for Linux, which also uses a binary tree for window management, and also uses a daemon/client model for interaction with the window manager. bspwm is by far my favourite window manager, in any OS I have used.

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


I used to use bspwm, but ended up moving back to i3wm. While i3wm is not perfect, I always found it to be more practical than bspwm. The ability to stack, for example, is very nice. What's the thing that you really like about bspwm? As much as I wanted to really like bspwm, when it came to using it for work, I just found it lacked something.


It just seems to resonate well with how I think about organizing my windows and I can predict its behaviour. For example, I almost always use manual mode when spawning new windows, so I can almost always predict how my desktop will look afterwards. I also _really_ like the dynamic configuration it provides through its client/daemon model (so you can try out different settings without changing your configuration file and restarting X), and the amount of commands that allow for fine tuning of bspwm's behaviour fits me very well since I like tinkering with it and create a configuration that does exactly what I want.


Curious, what issues do you have with i3?

Have been using it for a few years, really hits the sweet spot of easy-config + awesome functionality (stacked terminal windows with remote server load averages piped through title bar are a real nice-to-have for example). Floatable dock (i.e. scratchpad) is also pretty handy for skype, music player, notes, etc.

Only issue that's really bothered me is a minor one: with stacked windows you can't get the desktop background to show through properly with transparency enabled (via Compton or other compositor). Apparently that's been fixed in 4.11.

Anyway, no shortage of TWM options on Linux, everyone can have their (nearly) ideal setup ;-)


Well, I would like to have more control over the floating windows (that will never happen), for example.

One of the things I did like in i3 better than bspwm, for example, is resizing. Another big advantage is it works out of the box very well. Oh, another thing I remember now is i3 is more intuitive when moving things around the screen, especially when trying to switch between vertical and horizontal splits, at least in my experience. I can't really recall all the reasons. They were all small things that build up. I do run i3 straight from the git repository (next branch).

That said, in my experience, tiling wm are way ahead of other wm, especially if you are a programmer. I'm a big fan of vim and tmux (and vimperator for firefox, which adds vim-like behavior to it) and I have no mouse. I have a trackpoint, for whenever I need it.


With i3, I never found an easy way to swap two windows at different levels of the tree. With awesome or bspwm, I can just mod+drag. Also, automatic tiling in various layouts is nice.


I don't usually have complex layouts, and I really appreciate the stacking from i3, so in that sense i3 wins for me, but I guess if your layouts are more complex, you might appreciate bspwm power in that regard.


I'm a fan of Mjolnir: https://github.com/sdegutis/mjolnir

Hammerspoon is a less complicated fork of it: https://github.com/Hammerspoon/hammerspoon

My config: https://github.com/colindean/mjolnir-config


I totally agree - Hammerspoon rocks! I'm using it to build both an Alfred/Clipboard/anysearch replacement, and a way to move the mouse around the screen using VI like keystrokes!


On Linux and Windows I can make the current window occupy the left of the screen using Super+L, and the right side of the screen using Super+R. I rarely need more than this, in fact I find more than two or three windows distracting for most of my normal tasks.


I wish Apple would fully commit to tiling. We now have a situation where you can make an app full screen, if it supports it. Or you can have two apps side-by-side, if both apps support that. You can't go 'almost' full-screen - as in 'full-screen, but leave me the menubar' without something like Spectacle. I'm not even sure if keyboard shortcuts are available for split-screen, or if you can split two windows from the same app. But some apps support that themselves, of course. Shouldn't screen/window/tab management be a solved problem by now, rather than a bunch of disconnected hacks that sometimes work, but are touted as revolutionary features in the marketing material?


Hm? The menu bar exists in fullscreen apps. Move your mouse to the top and it will appear.


Yes, but I'd rather have it showing permanently. It doesn't take up much space, but it does provide really useful information - date and time, at the very least!


In Windows 10 you can snap between 2 and 4 windows in custom sizes and if you snap two you can drag the separator and adjust both of their sizes at the same time. It's one of those great little features that doesn't get advertised enough in my opinion.


ShiftIt will do that: https://github.com/fikovnik/ShiftIt


Another vote for ShiftIt here. I've been using it for a couple of years now, and I've found it fine for most purposes. Supports XQuartz+xquartzwm, supports multiple monitors, has configurable keyboard shortcuts.

A few more options would be nice, though - I somewhat often want 3 columns in a row, for example, particularly on a 16:10 or 16:9 screen monitor. When I had a 10:16 portrait monitor setup I quite often wanted 3 rows in a column, too.


SizeUp [1] (paid but inexpensive) does that well. They also make a version that uses cursor dragging instead of keyboard shortcuts called Cinch that I use daily. (I really wish they'd combine the two products for licensing purposes since they're 95% the same.)

1: http://www.irradiatedsoftware.com/sizeup/


In Win10 you can also do Super+U (or Super+D) after either Super+L or Super+R to move the window into the upper (lower) right or left quarter.


Screenshots, gifs, and videos of this in action would probably help clear up some confusion.


Long term amethyst user here, this looks really awesome. OUt of the box i feels much more like some of the linux tiling window managers and less like a hack.


Does this mean you've installed and are using it? Does it feel more responsive?


That screenshot is OS X? Anyone got any tips to achieve a look like that? I thought OS X customisation was basically dead.


If you look closely it appears to be a fullscreen iTerm2 running a fancy tmux powerline.

Edit: From https://github.com/koekeishiya/kwm/issues/8#issuecomment-166...

"The Apple menubar is hidden using the option that was added with El Capitan. I'm using the program nerdTool to create the illusion of a bar that you see in the screenshot."


I think that 'iTerm2' in the corner is just the name of the currently focused window.


I would love to know that too!


Someone already mentioned this in a comment above, but here you go : https://github.com/koekeishiya/kwm/issues/8#issuecomment-166...

I'm running something pretty similar, and it does look pretty good.


Just tried it. On the 24 inch monitor, I had 3 windows open and it perfectly tiled them. I used to use divvy and it was all manual, so this is great improvement. Plus one for auto focus.

Note: In case someone is wondering, to give accessibility access, check the checkbox for terminal in the security and privacy --> accessibility settings


Did the keyboard shortcuts work for you? I can't get them to work (even tried adding some flags to check whether they are being caught or not and they don't seem to reach hotkeys.so's code, ever, for me)


Not sure which, but some app I had open (I simply closed everything) was trapping the keycodes somehow. Weird (and mildly disturbing)


How many of these OS X WM replacements are configurable to use a 3-button mouse + a keyboard key for window management shortcuts?

I've used X11 for almost 30 years, and inherited a twmrc file at the very start which had the following mappings which have become muscle memory to me:

alt + mouse_left = move + raise

alt + mouse_middle = resize

alt + mouse_right = iconify

I've configured KDE to do this for years. I once tried switching to a mac, but between not being able to map the mouse buttons like that, and not having focus-follows-mouse. I ended up giving the Mac to my inlaws..


I got annoyed enough to write a tool to emulate this behavior on OS X: https://github.com/jmgao/metamove


I have been looking and hoping for something OS X like allSnap [1] for Windows where window sizing management isn't set up at prefixed sizes, but simply allows you to resize Windows as normal but they will snap to the sides of other Windows or screen edges. This allows you to nicely line up all your window edges with each other with little effort.

[1]: http://ivanheckman.com/allsnap/


I cannot give the binary access to OSX Accessibility because it is not an app bundle. It's greyed out in the System Preferences dialogue. Was anyone able to make it work?


Give Terminal.app access, and launch kwm from the terminal ..


That is even more insane from a security perspective than the whole accessibility api in general.


Yeah, no. I hope this gets posted again when it has an app bundle.


That app is not a actual tile manager. Setting the window position is different from actual "tile management".

Anyway for Windows a similar app is WinSplit Revolution.


Here are a few more screenshots of it in action:

http://imgur.com/a/tWBSg


Also check out AppGrid [1], a window manager for OS X 10.9+ that uses vim-like keys to move and resize windows. (Keys are configurable.) See the Releases tab for a pre-compiled binary. I've been using AppGrid for about 3 years straight every day.

[1]: https://github.com/sdegutis/AppGrid


I tried almost every window manager for OS X. But due to the OS X itself. Some apps have the min window sizes constrain and can't fit in a small part of the display. They always go out side of the grid. This is the most annoying part.

BTW I remember someone made chrome (or another app) running under fullscreen mode in a window. Anyone knows how to do that?


Kwm requires access to osx accessibility.

I know what they mean by this, but it's written in an awkward manner.


OS X agglomerates functions like screen resizing and keyboard interaction under a silo labels "accessibility". I imagine OS X will prompt you to give access.


I know that; this is exactly what I was getting at when I said "I know what they mean..."

My only point, and it's a small one, was that there's probably a better way to write this.


Is there any way to ask kwm not to auto-tile windows, but rather keep them all maximized and one behind the other and with all their title bars visible by default?

That's the way I prefer to use i3 on Linux, and it would be nice to find something like that for OSX.


I've found iTerm2 2.0's built in split wind is blowing xcellent and covers 99% of the use case for this, and full screen split window covers another .9%.




Applications are open for YC Summer 2019

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

Search: