
Kwm, tiling window manager for OS X - tbassetto
https://github.com/koekeishiya/kwm
======
sergiotapia
See also Spectacle:
[https://www.spectacleapp.com/](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.

~~~
preek
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/](https://mizage.com/divvy/)

2\. [https://i3wm.org/](https://i3wm.org/)

3\. [http://xmonad.org/](http://xmonad.org/)

~~~
stcredzero
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.

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

------
jcalonso
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/](https://ianyh.com/amethyst/) and
[https://github.com/puffnfresh/Honer.app](https://github.com/puffnfresh/Honer.app)

~~~
abathologist
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.

~~~
ianyh
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](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](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.

------
Saser
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](https://github.com/baskerville/bspwm)

~~~
farresito
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.

~~~
virtualwhys
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 ;-)

~~~
cosarara97
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.

~~~
farresito
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.

------
colindean
I'm a fan of Mjolnir:
[https://github.com/sdegutis/mjolnir](https://github.com/sdegutis/mjolnir)

Hammerspoon is a less complicated fork of it:
[https://github.com/Hammerspoon/hammerspoon](https://github.com/Hammerspoon/hammerspoon)

My config: [https://github.com/colindean/mjolnir-
config](https://github.com/colindean/mjolnir-config)

~~~
hipjiveguy
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!

------
noja
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.

~~~
oneeyedpigeon
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?

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

~~~
oneeyedpigeon
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!

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

------
pi-rat
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.

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

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

~~~
bojo
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...](https://github.com/koekeishiya/kwm/issues/8#issuecomment-166593294)

"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."

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

------
mkagenius
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

~~~
RBerenguel
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)

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

------
drewg123
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..

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

------
cgatesman
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/](http://ivanheckman.com/allsnap/)

------
superuser2
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?

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

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

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

------
mariusmg
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.

------
pfista
Here are a few more screenshots of it in action:

[http://imgur.com/a/tWBSg](http://imgur.com/a/tWBSg)

------
sdegutis
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](https://github.com/sdegutis/AppGrid)

------
dsdshcym
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?

------
wyclif
_Kwm requires access to osx accessibility._

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

~~~
mrits
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.

~~~
wyclif
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.

------
pmoriarty
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.

------
AlphaSite
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%.

