6 ms·
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 cre
by STRML 11y ago
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/ http://www.hammerspoon.org/
2. https://github.com/STRML/init/blob/master/hammerspoon/init.lua https://github.com/STRML/init/blob/master/hammerspoon/init.l...
- Linell 11y agoI 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 https://github.com/Linell/hammerspoon-config
- fit2rule 11y agoGuys - 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!
- javajosh 11y agoHammerspoon 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).
- lawry 11y agoThe 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 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)
- STRML 11y agoThat'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.
- dlau1 11y agoInteresting, I have been using mjolnir for some time for basic bindings (window resizing, jump to named windows). What does hammerspoon offer over it?
- erikcw 11y agoMy understanding is that Hammerspoon does not require one to use luarocks for all of the extensions. Basically, more batteries included...
- Linell 11y agoHammerspoon 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.
- lawry 11y agoI 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 https://github.com/mattr-/slate 2. http://www.controlplaneapp.com/ http://www.controlplaneapp.com/ 3. https://pqrs.org/osx/karabiner/ https://pqrs.org/osx/karabiner/ 4. http://pastebin.com/raw.php?i=1EbhTEjd 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/ http://stevelosh.com/blog/2012/10/a-modern-space-cadet/ if you like this sort of stuff!
- apaszke 11y agoI 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