AeroSpace is an i3-like tiling window manager for macOS
github.com
github.com
Given this layout:
h_tiles
├── window1 (focused)
├── window2
└── window3
`move left` will produce this layout: h_tiles
├── window1 (focused)
└── v_tiles
├── window2
└── window3Every time it wakes from boots, the desktop has complete amnesia with 3 screens.
Ideally I'd be able to drive my own workspaces, and it can use the laptop screen only, or 2 or 3 external monitors at different desks (work and home).
displayplacer "id:... res:2048x1330 hz:120 color_depth:8 enabled:true scaling:off origin:(0,0) degree:0" "id:... res:3840x2160 hz:30 color_depth:8 enabled:true scaling:off origin:(-918,-2160) degree:0"
displayplacer is very easy to set up and also gives you access to modes that you can't access with System Preferences.
The script detects the connected screen UUID and applies the appropriate layout
It's a little baffling how MacOS hasn't been able to get this to work. If a Matrox TripleHead2Go could hit a high enough resolution for multiple monitors it might be a possibility.
It did improve with a few tweaks but every so often it forgets.
First I thought it was a Macbook Pro thing. But a Mac Studio, with 3 separate monitors plugged into it, was just as confused.
I'm not sure how Windows and Ubuntu can handle it just fine from my experience.
I did not even know it was possible to drag windows. I do that by selecting the window I want to split, then setting a "vertical" split with "Command + v", then creating the new window (usually a terminal).
Or I move the window with "Command + Shift + [hjkl]".
That's very interesting! I've been hesitant to use similar WMs as basically all required disabling SIP. Anyone knows what AeroSpace is doing differently that it can work alongside SIP?
Edit: found this in the README:
> AeroSpace will never require you to disable SIP (System Integrity Protection). For example, yabai requires you to disable SIP to use some of its features. AeroSpace will either find another way (such as emulation of workspaces) or will not implement this feature at all (window transparency and window shadowing are not practical features)
Example. Mousing over another window on the way to the menubar.
If you had it, and tried to mouse to the menu, the menu would switch out from under you.
I have some notes in a file somewhere about how a Mac-native focus-follows-mouse could even work, because I want it. It would end up being a rather different implementation than the X Windows style.
Would love to see your yabairc if you can share.
yabairc - https://github.com/SxC97/dotfiles/blob/main/.yabairc
skhdrc - https://github.com/SxC97/dotfiles/blob/5db5e13f894f767722758...
If it's still not working, make sure SIP is disabled and the Scripting Addition is installed and loaded. Here's a link to the instructions as it's a little complicated: https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(...
Looking through it I don't see a setting for instant space switching... I think maybe it's provided by default when you install the scripting addition? https://github.com/koekeishiya/yabai/issues/1527
I have keybindings in my skhd for focusing spaces: https://github.com/kcrwfrd/dotfiles/blob/master/skhd/space
I usually just keep 10 spaces at all times rather than creating new ones on demand.
(I couldn't use yabai on my work computer as it requires disabling SIP, which the author of Aerospace explicitly argues against, which I find reasonable.)
Actually, in my Linux days I moved from i3 (which Aerospace is based on) to xmonad (which Amethyst is based on), but on MacOS Aerospace just feels quite better. None of the 3 WMs on MacOS comes close to what a true WM on Linux can offer, but I guess Aerospace is as good as it can get.
I have considered trying that by minimizing windows, but would never get around to it.
Tiling is doomed to sadness on macOS, because of lack of APIs. But this is probably the most performant approach.
Have used yabai, but only for moving windows and focus-follows-mouse. Not for tiling. Because flaky (not yabai’s fault).
Thanks nikitabobko.
Looking forward to trying it as soon as I figure out how to mod alt-tab to ignore all the windows (from every fake workspace) in the corner.
Also, linked in the docs, JankyBorders. Nice.
https://github.com/koekeishiya/yabai https://github.com/lwouis/alt-tab-macos https://github.com/FelixKratz/JankyBorders
Command+Tab is global window switch. The ones above are for "local" switching in the context of the workspace.
Not linux-primary right now.
I can remember my linux-style stacking commands in order to try it.
But I would want to fix my alt-tab at some point.
Note: my sway (or mac) usage is basically two vertical windows or stacks of panes on a laptop screen. So a pretty simple setup.
But it won’t work with AeroSpace.
I mean, it will work, but it won’t work with all windows from _visible spaces_.
Because ever window from _every space_ will be in the current space (tucked in the lower right corner).
For example, with Raycast I can resize and float a window using "reasonable size" option, which also puts it in the middle. I can use left half and right half to create a split, or I can maximise a window or even use quarters or thirds. With AeroSpace, trrying to move the windows in the tiles using left half, right half, or left two thirds or using reasonable size to float the windows, it doesn't work.
Also, there are bugs associated with moving apps to "next desktop" and "previous desktop". AeroSpace seems to have its own implementation of Mac's multiple desktops called workspaces, so the video guide actually doesn't show transitioning between different desktops, but different workspaces. As a result, using "next desktop" and "previous desktop" completely breaks the tiling. I would've liked Workspaces to just be associated directly with the different Mac desktops so that the movement between workspaces just moves to the different desktops so there is some compatibility with Raycast and native MacOS.
I think it’s going to become a standard app on Macs for powerusers in the future
I really need to deepdive into it because it does so much useful stuff. I use the Linear.app integration the most.
So I find it really pretty reliable and pretty great. Multimonitor is hard and I don't use it much, but having stacks and fast 'full-screen' to minimize is so great
On some version upgrades, work antivirus thinks it's a virus so disables it for 24 hours, and I hate using my computer those days, it feels so clunky and sad
I have not found anything better though, but I will install Linux when it’s working well on Apple Silicon. Only i3 is at least for me enough reason to use Linux as Mac OS X, again imho, is terrible window manager wise.
Aerospace goes bongers when i have native full screen. It will get confused on what to focus. My case:
Workspace 1: terminal Workspace 2: slack app Open chrome in native full screen
Now try to switch to workspace 1.
Will give it more time without native fullscreen apps for a while. Hopefully it works better.
Is the i3 stuff the difference?
Personally I use a utility that allows resizing and moving windows with the mouse from anywhere on the window when holding a modifier combination, like Fluxbox. Not as automatic, but also never flaky - more like making floating much easier with less mouse movement than moving to a totally managed style.
Multi monitor support is the killer for me, but there are other small wins.
When you move a workspace in Yabai to a new monitor, it changes it's ID so you can't keep using keyboard shortcuts to access it (alt+2 breaks because it is no longer workspace 2, it becomes 11 or another number). I can move workspaces between monitors easily with alt+m and alt+shift+m.
The other feature is that windows snap instantly without any Mission Control animations. That is a big one that really irks me.
Those are the two features that I need most days and I find Yabai completely unusable because of the lack of workspace support
[0] https://github.com/koekeishiya/yabai/wiki/Disabling-System-I...
there are a few oddities, and I need to file a couple of bug reports, but it has made macos so much more tolerable than amethyst.
As an Amethyst user, I'm approaching this comparison from the other direction: is there one compelling reason to switch?
The improvement I'd most like to see in Amethyst is more stable window placement when I remove a monitor then add it again (I do that a lot with my laptop).
It would be fantastic to have integration between Amethyst-managed spaces, Firefox windows, and Proton Pass vaults. As in Space 1 knows that new windows should use the Google account in my Work vault, and Space 2 knows that new windows should log out from Google because there is no Google account in my Personal vault. I doubt that's an imminent prospect, though.
In general, I prefer the Amethyst approach of extending the builtin OSX window management to the Aerospace approach of replacing it. Clearly the Amethyst developers weren't convinced that it's impossible to move windows between spaces with hotkeys, because they went ahead and implemented that.
Overall, I'm really happy that these window managers are being written. I use a 42 inch monitor, which would be awkward without them.
https://github.com/ianyh/Amethyst/blob/development/docs/conf...
Actually, in my Linux days I moved from i3 (which Aerospace is based on) to xmonad (which Amethyst is based on), but on MacOS Aerospace just feels quite better. None of the 3 WMs on MacOS comes close to what a true WM on Linux can offer, but I guess Aerospace is as good as it can get.
One issue: If an app uses native Mac tabs, Aerospace treats each tab as a window, which completely breaks the full screen functionality. Alacritty is one example. It’s really odd.
Edit: there’s an open issue for this: https://github.com/nikitabobko/AeroSpace/issues/68
Somehow over the past few years Windows became the more vibrant platform for twms (vs macOS) with developers (including myself) trying to push the envelope and introduce many quality of life features you still won't find even in Linux twms today.
https://github.com/LGUG2Z/komorebi
https://github.com/glzr-io/glazewm
https://github.com/dalyIsaac/Whim
Hopefully this new entrant will drive even more innovation in this space on macOS.
I think this should be possible in linux with a bit of work (erm, famous last words?) especially because the whole desktop environment is fundamentally open and you don't need to depend on this providing an API.
But I think an even better approach is to have build this functionality using screen parsers backed by recent AI advances. That way, you decouple the source / rendering of content from the sink / consumption of content, and can have more flexible behavior on behalf of the end user. I anticipate (hope) such tools to pop up over the next few years.
StumpWM has this and it's a beautiful thing (default binding: prefix+"). I got in the habit of titling terminal and browser windows with the topic name of whatever I was working on. Made for very fast switching to find what I wanted among many windows/topics.
Sadly I've needed to switch to Wayland and StumpWM is X11 only but it has a successor called Mahogany[1] that's being worked on.
Oh, and both are written in Common Lisp if you like tweaking your WM from the REPL.
Compare basic multi-monitor commands in something like bspwm[1] or yabai[2][3] to twms on Windows where this is typically handled transparently by directional `move` and `focus` commands understanding monitor boundaries.
Besides this, Whim has implemented a very functional ctrl+p style command palette which provides a great interface for more advanced on-the-fly/one-time window manager interactions.
With komorebi I think that having different border colours to indicate different types of containers is very helpful (one colour for single window stacks, a different colour for monocle containers, a different colour for stacks with multiple windows), as well as custom window-based work area offsets[4] (so if you have an ultrawide monitor with only a single window on a workspace, you can add offsets to the sides so it doesn't stretch across the whole width and give poor usability).
It's not really any one "big thing" but rather a difference in approach which adds up over many small design decisions.
[1]: https://github.com/baskerville/bspwm/issues/563
[2]: https://github.com/koekeishiya/yabai/issues/505
[3]: from my own personal yabai config - imo this is not really acceptable for a user facing API, especially for basic commands like focusing and moving:
```
# focus window
alt - h : yabai -m window --focus west || yabai -m display --focus west
alt - j : yabai -m window --focus south || yabai -m display --focus south
alt - k : yabai -m window --focus north || yabai -m display --focus north
alt - l : yabai -m window --focus east || yabai -m display --focus east
# swap window
alt + shift - h : yabai -m window --swap west || yabai -m window --display west && yabai -m display --focus west
alt + shift - j : yabai -m window --swap south || yabai -m window --display south && yabai -m display --focus south
alt + shift - k : yabai -m window --swap north || yabai -m window --display north && yabai -m display --focus north
alt + shift - l : yabai -m window --swap east || yabai -m window --display east && yabai -m display --focus east
```Does anyone have experience with this particular one and does it resolve these sorts of issues?
> Windows get repositioned by normal interactions and the window manager is not able to wrangle them
I'm certainly biased, but no, I don't face issues like that
> and connecting external monitors is a disaster
Connecting and disconnecting external monitors is an important use case for me as well. I dedicated my time to support specifically this case, so hopefully it works correctly for other users as well
Based on the documentation the toml syntax is stretched quite a bit to implement some logic and callbacks. Have you considered some scripting language to make it easier to do, or is the need for this kind of advanced use so little that it's not really a problem?
The complexity of the config has grown since then, with the bigest (and, actually, the only) problem being on-window-detected callback as you mentioned.
I've been thinking about using a scripting language like Lua, but I haven't made my mind yet whether it's worth it
I just tried this. I love it. No SPI and no transitions, just fast switching of apps. I will probably switch to this.
Thank you for your work!!
[1] https://github.com/nikitabobko/homebrew-tap/blob/main/Casks/...
I specifically don't like how painfull Apple does it. (Google for "notarization hell macos")
This is my pet project that I do for fun and for free. Bowing my head to Apple every time I want to release a new version is not fun. Waking up in the middle of the night, because Apple revoked the app (https://github.com/nikitabobko/AeroSpace/issues/167) is not fun.
AeroSpace is a tool for developers by developers. Developers can audit the code and install the app from sources
The experience is better than Amethyst or Yabai, but there is a learning curve. I think it would help if the documentation was one single searchable page, instead of several subpages.
The default keybindings interfere with macOS's special characters, so I would recommend changing the modifier keys away from option+ and option+shift+.
One thing I couldn't figure out. My setup is as follows:
h_tiles
└── v_accordion
├── window1
└── window2
└── v_accordion
├── window1
└── window2
I would like to limit the total number of horizontal tiles--more than two is too many--but I can't figure out how to make new windows automatically go into either accordion stack instead of a new horizontal tile. Is there a way to set mins and maxes per tree level? This is one of those features that Amethyst has that seems like a no-brainer.I had to unfortunately stop using aerospace due to some bugs. If I switch from workspace a to workspace b, sometimes aerospace keeps switching back to workspace a. It is annoying when you are trying to press the unmute button in the middle of a call but aerospace keeps taking you away from that workspace. The root cause could be that the apps that I use (internal tools) are misbehaving. I'll file a bug report if I can reproduce it on my personal mac.
As I'm learning to use this, I'm having trouble conceptualizing how my windows are organized in the tree, and how I'm affecting it.
In terms of desktop layout, mind I don't use one, the Oberon vision comes to mind. A single, large pane, with all(?) of the others stacked to one side.
My friend didn't use a tiling window manager, but had this desktop laid out as such, but all of those windows were terminal windows that he kept an eye on (he was our ops guy).
But are folks using these layouts with their web browsers, word processors, IDEs, etc.?
One typical case is navigating a file manager to grab files that I need to drag and drop on a web UI, or folder/URI slug names I need to keep copying back and forth to use on a workflow.
Another is watching stdout/stderr of a running script and a log tail at the same time.
Sometimes I have tabs of web, file manager and some other app on one side and a terminal on the other as terminal commands are the glue of a workflow.
Or I'll be screening a video on the left and doing edits on the right. Or keeping notes open on the side during a conference call.
Sometimes I'll only have one window in a virtual desktop and ultrawide is too much, so I just have an idle terminal window as padding.
Not having to hunt around for windows then hunting for their edges helps when I'm constantly opening, closing and sizing terminals, file managers and so on and so forth. It simply is faster with tiles.
I have one of the "drive in theater" iMacs, and I prefer the windows in the center. It's big enough that if things were on either side, I'd have to crane my neck to focus on either side. I'd hate to have to do that all the time.
I guess if I were to do anything "tile" wize it would be two smaller columns, one on the left, and one on the right, and then the big center as the main focus.
1. Emacs. Coding and other stuff
2. Browser. Either the web application I'm working on and other searches
3. Terminal. For long standing actions and other system stuff.
4 . Documentation. Mostly another browser windows.
5. Utilities. Mostly GUI related to the current project I'm working on (Database, API Tests,...
I'm working inside a VM (macOS hosts) so I use the host software for other things. But if it bare-metal, I'd add a workspace for media, and another for communication.
As you may guess, it's almost one maximized application for each workspace. This way I can quickly switch to it with the keybindings. The only time I have a proper tiling structure is when I need the information from both windows at once (Taking notes and reading a document,...). Tiling is mostly about not thinking about where the windows will be, not to have everything there at once.
macOS has Spaces, but the ergonomics are bad. Especially the animations if you use them a lot.
It's not clear to me from the example configs, either default or i3-inspired. I've never used i3, though I did use AwesomeWM extensively about a decade ago.
Edit: ah, the `join-with` command which is a superset of the `split` command. In the default config, alt-shift-semicolon to enter Service mode, then alt-shift-h/j/k/l for neighbor selection.
printf 'one\ntwo\nthree' | dmenu -l 3 -p "Which one? "
I use that in so many scripts on my main machines and would love to share them with macOS folks. I'm really surprised its not in something like Alfred.Maybe it exits and I don't know about it?? If not, maybe someone will add it to this open source Spotlight replacement I found: https://github.com/techrisdev/Snap
I honestly think Apple would be half keen to do it themselves, they just probably haven't seen the idea to steal it yet
[0] https://github.com/irth/dmenu_raycast
[1] https://akko-cdn.hackrc.dev/media/e34cdc7683fece5260124ef47c...
Extremely thankful for both projects.
[1]: https://nikitabobko.github.io/AeroSpace/commands#workspace-b...
Can someone ELI5 what this does? Does it impact AeroSpace only, or something globally on my Mac? Thanks!
I frequently need to run a command like the following before running a downloaded program, which I'm guessing is exactly what the install script does:
xattr -d com.apple.quarantine some-program.app
The README links to the Homebrew install script, relevant lines highlighted here: https://github.com/nikitabobko/homebrew-tap/blob/main/Casks/...
If you are actually using tiling WM on mac, could you share which one and why?
You're better off just sucking it up and using the native UI until you get sufficiently familiar with it that it rarely gets in your way too much. Meanwhile keep lobbying your employer (assuming that you are being forced into this by your job) to support Linux for development workstations.
No matter how sophisticated these Mac Window Managers get, MacOS will always mess with the windows because it knows better than you. That's why people buy Macs, and it's not going to change. If you don't like this, then you actually don't like Macs.
It's opinionated, and it's opinions do not match yours. I would have liked window snapping, but instead we have 1/2 baked split screen virtual desktops.
I simply don't understand why people use them for development environments, the "Unix underneath" doesn't help enough in enough scenarios when it's hostile in so many others.
There’s at least non-fullscreen tiling available now if you hold down Option/Alt when hovering over the green traffic light (which also changes the corresponding Window menu items to “Move Window to (Left|Right) Side of Screen). There should probably be a toggle somewhere that makes this the default.
> I simply don't understand why people use them for development environments, the "Unix underneath" doesn't help enough in enough scenarios when it's hostile in so many others.
A lot of it is that the hardware is well-rounded and not as riddled with gambles/compromises as most other laptops are. Usually non-Apple laptops have at least one or two things that suck about them, with the most frequent being battery life, fan noise, and poor thermal design but include mediocre screen, bad keyboard, bad trackpad, bad power management, bad unplugged performance, bad port placement, and chintzy build among other things.
Some percentage of users also just like macOS as it is, though.
- it’s generally smooth and stable from a UI standpoint
- it has mostly sane defaults
- it has great font rendering
- the video and audio subsystems are rock solid
- it has access to every development tool I need daily via homebrew
It seems like there are generally two perspectives:
- “I shouldn’t have to change the way I want to do things”
- “I don’t mind changing to another way of doing things”
The first group I think has a harder time with macOS.
A while back I decided to experiment with only using the default first-party apps for macOS for everything, and it greatly changed the amount of OS customization I did from that point on. I still live in iTerm for most of the day, but I don’t really feel hindered by the OS in any way anymore.
From my experience Windows actively attempts to subvert my clear, authoritative commands, second guesses every admin instruction, interrupts me with focus changes and dialog boxes instead of giving the active window absolute priority (this happens sometimes with macOS, too), and comes with bloat right out of the box. When this developer thinks about a hostile OS, Windows 11 is rhe first thing that comes to mind.
Why bring up whataboutism? I honestly don't care that Windows is also hostile. It also has the worst implementation of virtual desktops. What has that got to do with MacOS also being generally terrible.
The rest of your comment adds nothing, as it just repeats what I said.
Used Yabai at first last time I was forced to use a Mac. Hated it with a passion. It was "close", but not close enough, and so I felt I was fighting it all the time.
Ended up running most applications full-screen instead, and relying on tiling in iTerm2 or the applications most of the time instead. It helped that I was connected to a second monitor most of the time.
That said, Rectangle works - in my experience - flawlessly and is an essential addition to Mac window management. It’s not as ambitious as a full TWM, but what it does provide (snapping, hotkeys, etc) is essential.
I tried both Yabai and Amethyst and, frankly, neither provide a clean experience.
Yabai requires disabling some OS security feature iirc, which may or may not be an issue for you. I seem to recall having issues with it, and switching to Amethyst pretty soon after. It might also only support BSP layout, which I dislike - stacks all the way.
Amethyst feels a little half baked. It works well enough, but configuration is through a GUI and saved in some non text format, making it not difficult friendly. It also doesn't support things like moving windows between workspaces, meaning you need to have additional bindings for that through the MacOS command center or whatever it's called.
Overall, I managed with Amethyst for close to 2 years, so that's the one I'd recommend of the two. Luckily I'm back on a Linux machine and can use river now. :)
Good luck!
It's been a while since I used Amethyst as the Mac is now on complete corporate lockdown, but I remember that being the biggest feature I used on Amethyst. MacOS doesn't support it, but Amethyst did.
So like if I have windows in four corners, and focus is in the bottom left, I want something like ?-k ?-l to move focus up and then right. Now focus should be in the upper right window. Have I missed it? Does rectangle make this possible?
Amethyst (xmonad inspired) gets close, but I want directionality, not cycles within cycles.
So far my solution is to just use i3 on my desktop and have a bunch of ssh sessions into my macbook, which is fine until I do a clipboard-yank through the ssh session and wonder why I can't paste the contents into the browser on the linux side.
You can check out my configs here [0] if you are so inclined, but it's not super polished.
The good thing about RCMD is I can specify which specific key, consuming only 1 OPT or CMD key while saving the other key for the OS shortcuts
However, it does get more complicated with multiple monitors and I don’t know of the solution here. You’re right that the UX falls when you’re trying to work with menus across multiple monitors.
Perhaps the right mix is doing something like the Chrome extras menu or if you’ve used VS Code on the web, where you have a small hamburger or (…) button that opens a context menu. Then you still have a menu for the application, but it’s hidden until you need it.
These days the menubar is always on all displays, not just the main one?
(unless maybe you have "Displays use separate Spaces" unchecked?)
Product looks amazing. I use Divvy but will definitely try out AeroSpace. Great name too.
I started it when I already had my usual number (many) of windows open across my usual number of spaces (lots) on my usual number of displays (3). First it spent 30 seconds trying to give me a seizure, and when it had finished I'm left with a total mess of a layout. Some windows 30px wide. Some windows not-quite-fullscreen. Some windows just randomly floating without any kind of recognisable pattern.
Now I can't navigate around because dragging a window sends it flying off to the corner of a different display. None of the default keybindings seem to do what they say they should. The focussed window disappeared entirely when I tried resize mode, and I can't find the way out of it because that was the window with the instructions.
I think I'll try something else.
As a tiling wm user (Hyprland now) I always wonder how OSX users claim they're that productive with all those alt+tabbin' I meant cmd+tabbin'. Welcome to the 2010s guys!
I internalized the swipe gestures (3 fingers left/right) early on with OS X 10.6 snow leopard and then with the Mission Control update (3 fingers up) I am basically always faster with a trackpad than any keyboard “workspace” navigation.
So my tip for being productive in a tiling window manager is to get a linux machine and use sway.
2. I myself consider the virtual emulation of workspaces to be the strongest feature of the AeroSpace. If I could disable the workspace switching animation in yabai or Amethyst (with SIP enabled, of course), I'd probably not bother myself creating AeroSpace. That's what the "space" part in the app name means. It resembles the strongest feature of AeroSpace - workspaces
I also tried implementing an i3 like workspace numbering/creating on top of yabai - it was an uphill battle due to how limited native macOS space management is and I never finished, so thank you for creating AeroSpace :)
I actually use it in tandem with yabai now - I added an "exec-on-window-hide"[0] option similar to "exec-on-workspace-change", and use it to make the hidden windows transparent (and to make them visible again)[1].
I wonder if hooks like that would be a good way to have a nice middle-ground to let people who don't care as much about SIP to extend upon AeroSpace's model?
I'll probably send over a pull request for your consideration soon.
[0] https://github.com/irth/AeroSpace/commit/54b48aa0edf9817031c...
[1] https://gist.github.com/irth/0bc96778c6073c756d3bb657f1bfe8b...