Spectacle has worked well for me for years on OS X. I highly recommend it. I completely agree with you on xmonad though (or any true tiling window manager).
Many of these sorts of apps reposition windows and scale to half or quarter of the screen. What I really want is intelligent repositioning so that none of my windows overlap. (xmonad, without resizing the windows.) Failing that, magnetic edges.
Unfortunately, what I want is really the job of a window manager, or should be done at the OS level. On the Mac, there is no true user-serviceable window manager that can be replaced.
I'm a big fan of the BetterSnapTool available on the App store. It costs $1.99, but it works with all widows and has drag-to-snap, shortcuts keys, etc.
I'm still surprised Apple hasn't just incorporated this into OSX.
BetterTouchTool is free, and strangely incorporates the same window snapping functionality as it's sister: BetterSnapTool. I've always been a little confused by the paid download for BetterSnapTool... Unless I'm missing something you can get all the same functionality and more (mouse and trackpad configuration etc) with BTT.
"ll" may not be the best choice of default alias - it's pretty common for people to already have it aliased to "ls -l" (or -la, or -lah, or whatever their preferred default flavor), especially for the type of power users this is targeted toward.
I realize this is a bit of a moot point since the user can always change the alias, but it's generally better UX if the default is something most people will use.
I know about it, but I didn't have an 'll' alias so i picked it just to be consistent with 'rr'. If you wish you can configure the aliases in the install.sh file (if you decline to overwrite an existing alias it asks you to type another one) :)
I use Emacs in full screen mode on OSX. Then I split into usually 3 or 4 panes and launch a terminal in one of them. Then I have a todo list in another and the code I'm editing in another.
no, really bettertouchtool ! Actually I've just found out that booth tools are from the same author. Bettersnaptool functionality is included in Bettertouchtool and there it is for free: http://www.bettertouchtool.net
I use ShiftIt (https://github.com/fikovnik/ShiftIt), which is similar, as I recall, but free. Has keyboard shortcuts. I use it for pretty much all my windows.
Yes - have been using shiftit for years now and love it.
I didn't even need to program or customize any hot-keys since everything I want to do (full screen, half screen, quarter screen) is already built into a hotkey.
I use SizeUp as well. One really nice feature is that there are keyboard shortcuts to move windows from one monitor to another. I tried some other OSX window managers but they were buggy, SizeUp ended up working the best.
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].
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.
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!
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).
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)
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.
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.
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]
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
I have installed Breeze which seems to be very similar. But I rarely end up using it. Its top-bar menu is too slow to use, and I can never remember the hotkeys for positioning.
The interesting part of this solution is realising that for terminals, using the mouse nor long complicated keyboard shortcuts are needed. Terminals have text input, you can type where the window is supposed to go. There commands can be memorable, and there is no risk of collision with other global hotkeys.
I agree, which is why I absolutely adore Amethyst[0]. It is a "clone", if you will, of xmonad -- it's automatic, and keyboard shortcut driven entirely. No menu bar icon needed -- all windows snap to the grid to fill the screen by default, you can adjust the sizes on the fly, you can swap layouts with a single shortcut and viola! I highly recommend it, it used to be quite buggy but I've had zero issues in the last few months. @ianyh is an amazing developer!
Yes, I concur .. for me this project not only has some proper Applescript to learn from, but its install script is genius as well, although it has a bug or two, which you'll see if you try to add an alias for a command you already have ..
Still, a very interesting little bit of scripting to solve a common, age-old problem.
It found a conflict with an existing alias .. 'ul' I think it was .. and then all other aliases were considered in conflict too, even though they for sure were not. On OSX, 'ul' is the 'underline utility' from BSD, dunno if that is worth knowing.
I just hit enter and it soldiered on and then I manually changed the aliases in my .bashrc file ..
I am aware of 'ul' conflict, but I haven't heard of it before, so I just hoped that it's not popular :x If you've found a bug in installation script then please post an issue at GitHub :)
Try making a cross-platform one! Maybe you'll find out ;)
(Less cheeky response: no two platforms handle this stuff in the same way. You'd be able to share such a small amount of code between platforms that you'd be better off just duplicating that code rather than trying to create some kind of abstraction. This is true even if you decided to start out by not using something entirely OS X-specific such as AppleScript.)
The problem it's trying to solve is also mostly platform specific. On windows and most Linux DEs you usually have default keybindings to move windows to the right half/left half/fill the screen.
I'm an i3 Linux user, and it's always sad to see the state of tiling window management on OS X. I use OS X on my work machine, and while I'm able to mimic some of i3's behavior on OS X, it's never quite the same, and I always find it frustrating.
There are a number of tools that provide some subset of the functionality, but they always lack some critical piece (oftentimes FFM, multi-monitor support, or window containers).
One of the more frustrating bits for me is that on OSX there are four modifiers (shift, control, option, and command), but none of them is exclusive to interacting with the "window manager". There's a lot of interface dissonance when I interact with anything over ssh (because "cmd" takes the place of an "alt" key), or use X forwarding.
I've dedicated Mod4 to interacting with my window manager for over a decade and it's sensible. Mod1 and control (and, if absolutely necessary, shift) are plenty for keyboard shortcuts for apps.
Just looking at the plethora of solutions for this problem, that are recommended in this thread, makes me think that there is something here that is being radically missed by the OS decision-makers that don't implement these kinds of tiling features by default in the OS. So many solutions to the same problem! Surely this is a sign that there are features missing in the Window manager, which should be making it into the OS at some point?
I didn't include it, because OS X can already make the window full screen. Do you think it would be useful just to resize the window without creating a new desktop?
But honestly I switched to Hammerspoon and with some searching/learning lua/copy-pasting have the same functionality, and it's even more extendable. If you can describe what you want to do with the windows/current app/whatever, you can probably write it in lua.
Hey guys, I'm a creator of termitile. Many of you have pointed out that there are lots of window managers for OS X and my intention wasn't to create just another one. What I really needed was a bunch of script that I could alias and use directly from the terminal without cluttering my global keyboard shortcuts. I couldn't find any other programs that had a terminal API, so I've just hacked this one :)
So just to be clear, it's not intended to be a replacement for Amethyst, Divvy, or any other universal manager, but just a quick solutions just for the terminal, because you can control it with regular commands!
74 comments
[ 2.8 ms ] story [ 149 ms ] threadThough what I really want is native xmonad in OSX.
0. http://spectacleapp.com/
[0] - https://github.com/ianyh/Amethyst
https://github.com/ianyh/Amethyst
Unfortunately, what I want is really the job of a window manager, or should be done at the OS level. On the Mac, there is no true user-serviceable window manager that can be replaced.
I'm still surprised Apple hasn't just incorporated this into OSX.
http://www.bettertouchtool.net/
I realize this is a bit of a moot point since the user can always change the alias, but it's generally better UX if the default is something most people will use.
Works great for my use.
(A few years ago, before I started using OS X, I wrote something similar for Windows, for use with AutoHotKey: https://github.com/tom-seddon/align_window2)
I didn't even need to program or customize any hot-keys since everything I want to do (full screen, half screen, quarter screen) is already built into a hotkey.
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...
Here's my configuration file.
https://github.com/Linell/hammerspoon-config
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)
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.
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.
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!
The interesting part of this solution is realising that for terminals, using the mouse nor long complicated keyboard shortcuts are needed. Terminals have text input, you can type where the window is supposed to go. There commands can be memorable, and there is no risk of collision with other global hotkeys.
[0] https://github.com/ianyh/Amethyst
Still, a very interesting little bit of scripting to solve a common, age-old problem.
What is the bug you're talking about?
I just hit enter and it soldiered on and then I manually changed the aliases in my .bashrc file ..
Had the same problem as those guys.
EDIT: (for those reading) .. the issue has now been fixed. Kudo's!
(Less cheeky response: no two platforms handle this stuff in the same way. You'd be able to share such a small amount of code between platforms that you'd be better off just duplicating that code rather than trying to create some kind of abstraction. This is true even if you decided to start out by not using something entirely OS X-specific such as AppleScript.)
http://www.semicomplete.com/projects/xdotool/
There are a number of tools that provide some subset of the functionality, but they always lack some critical piece (oftentimes FFM, multi-monitor support, or window containers).
I've dedicated Mod4 to interacting with my window manager for over a decade and it's sensible. Mod1 and control (and, if absolutely necessary, shift) are plenty for keyboard shortcuts for apps.
I stick with bettertouchtool combined with some keyboard shortcuts though.
[1] http://totalterminal.binaryage.com
But honestly I switched to Hammerspoon and with some searching/learning lua/copy-pasting have the same functionality, and it's even more extendable. If you can describe what you want to do with the windows/current app/whatever, you can probably write it in lua.
[1]: https://github.com/eczarny/spectacle
iTerm2 handles split panes quite nice as well.
So just to be clear, it's not intended to be a replacement for Amethyst, Divvy, or any other universal manager, but just a quick solutions just for the terminal, because you can control it with regular commands!
I hope you like it!