News for hackers. Stuff that matters.
Re:Terminal Window Manager for OS X by STRML on Sunday August 16, 2015 @02:40PM (#10069814)
As always, I recommend Hammerspoon [1] when these sorts of things come up. If you can program Lua (or you know JS or Python, which is close enough), you can create any kind of window management system you want, saved layouts, contextual layouts across multiple monitors, adjust wifi/sound based on location, tab multiple windows, and a lot more.

There are a lot of hammerspoon configurations around that will give you some cool ideas. Mine is below [2].

1. http://www.hammerspoon.org/

2. https://github.com/STRML/init/blob/master/hammerspoon/init.l...

Re:Terminal Window Manager for OS X by Linell on Sunday August 16, 2015 @03:25PM (#10069958)
I second Hammerspoon. It fits perfectly between being barebones enough to not get in your way and having enough features to do just about anything you want.

Here's my configuration file.

https://github.com/Linell/hammerspoon-config

Re:Terminal Window Manager for OS X by javajosh on Sunday August 16, 2015 @04:13PM (#10070110)
Hammerspoon looks quite good (and thank you for writing up usage instructions - I like the "mash" concept :), but part of me wonders whether or not this deserves a port to node. The reason why would be to leverage something like D3 to do window layout (I want either a treemap or a force-directed graph).
Re:Terminal Window Manager for OS X by yoklov on Monday August 17, 2015 @01:56AM (#10071540)
It would likely be less effort to port those parts to Lua instead of the whole system to node. Does D3 even run headless anyway?
Re:Terminal Window Manager for OS X by therein on Monday August 17, 2015 @05:18PM (#10076194)
I guess you could have it display a WebKit window.
Re:Terminal Window Manager for OS X by yoklov on Monday August 17, 2015 @06:59PM (#10076668)
It wouldn't be a window manager then though...
Re:Terminal Window Manager for OS X by fit2rule on Sunday August 16, 2015 @04:06PM (#10070091)
Guys - thanks for informing us about Hammerspoon and sharing your configs - I've learned a lot in the last 5 minutes and solved some problems that have plagued me on OSX for years. Kudos to you and the Hammerspoon team, its a terrific tool!
Re:Terminal Window Manager for OS X by lawry on Sunday August 16, 2015 @06:44PM (#10070541)
The naming of mash if awesome, mash! I'd like to recommend to set a hyper key using karabiner, such as I have done with tab: http://pastebin.com/raw.php?i=1EbhTEjd

This way if you press tab on it's own it still behaves as the tab key, but combined with another key it acts as Hyper, or mash.

I also love the "Shift to Shift (+ When you type Shift only, send the appropriate parenthesis)" option, and have my caps-lock mapped to control, with karabinier doing: Control_L to Control_L (+ When you type Control_L only, send Escape)

Re:Terminal Window Manager for OS X by STRML on Monday August 17, 2015 @10:32AM (#10073192)
That's pretty cool! In my config above, I ended up just using caps lock. It's a bit of a pain to remap, you have to use both Seil and Karabiner, but once you get it, it's very convenient.

The entire cmd+shift+alt+ctrl keymap space is open, except with the (surprising) inclusion of cmd+shift+alt+ctrl+., which does a sysdiagnose. So I added a warning about that.

Re:Terminal Window Manager for OS X by lawry on Sunday August 16, 2015 @06:37PM (#10070522)
I migrated from Slate [1] to Hammerspoon during a reinstall without any regrets so far. I've also noticed the things I always wanted to do with ControlPlane [2] are perfectly doable with Hammerspoon, if you put some time into reading the docs and api (they are really good). (Basically switching bluetooth on/off when I connect my keyboard, and quiting networking apps when I switch off WiFi without a cable connected, like droplr, dropbox...)

The most powerful thing about Hammerspoon seems that you build your .hammerspoon/init.lua with time, and as things tend to frustrate you more often, you put time into looking up how to optimise things by writing lua, oh and there's a console/repl, yay! A bit like my .vimrc really.

Btw, I use a Hyper-key that is mapped using karabiner [3], here's my private.xml [4]

1. https://github.com/mattr-/slate

2. http://www.controlplaneapp.com/

3. https://pqrs.org/osx/karabiner/

4. http://pastebin.com/raw.php?i=1EbhTEjd

A lot of this was inspired by Steve Losh, who does awesome stuff! checkout http://stevelosh.com/blog/2012/10/a-modern-space-cadet/ if you like this sort of stuff!

Re:Terminal Window Manager for OS X by dlau1 on Sunday August 16, 2015 @04:37PM (#10070178)
Interesting, I have been using mjolnir for some time for basic bindings (window resizing, jump to named windows). What does hammerspoon offer over it?
Re:Terminal Window Manager for OS X by Linell on Sunday August 16, 2015 @07:21PM (#10070644)
Hammerspoon is actually just a fork of Mjolnir from a few of the more active community members.

It has a bit more modules and whatnot and emphasizes ease of use more than Mjolnir. It comes pre-packaged so that you don't need to bother with Luarocks and finding each and every package that you want. It is also under active delevopment. .Steven Degutis, the Mjolnir creator and maintainer, has said that he won't be doing anything other than merging necessary pull requests.

So really, for what you're using it for, probably not much. It's almost a matter of preference.

Re:Terminal Window Manager for OS X by erikcw on Sunday August 16, 2015 @04:39PM (#10070184)
My understanding is that Hammerspoon does not require one to use luarocks for all of the extensions. Basically, more batteries included...
Re:Terminal Window Manager for OS X by apaszke on Monday August 17, 2015 @07:51PM (#10076830)
I am aware that there are lots of universal window managers, but I just wanted something simple that would have a terminal API. This is why I've created termtile