Readit News logoReadit News
idle_zealot · a year ago
I daily drive this and my verdict is: it's the best way to manage windows on a Mac, but falls short of i3/sway. In particular, support for re-arranging windows by dragging them to positions relative to one another is extremely limited in that it's not able to create new vertical or horizontal splits the way you can in sway, which forces me to take awkward detours with keyboard commands to get to the window layout I want most of the time. Like, say I have two windows side-by-side, and I want to split one of them vertically. In sway I'd pop open the new window, then drag it to the top or bottom half of the window I want it to share horizontal space with, and bam, all done. With aerospace the best way I've found to do this is to open the new window, then switch all three windows into a vertical stack, then focus the window that was originally on the left and invoke the 'move left' command on it.
nbobko · a year ago
If you have normalizations enabled, you don't need to "switch into a vertical stack"

Given this layout:

    h_tiles
    ├── window1 (focused)
    ├── window2
    └── window3
`move left` will produce this layout:

    h_tiles
    ├── window1 (focused)
    └── v_tiles
        ├── window2
        └── window3

idle_zealot · a year ago
Ah, so it does. I suppose this is an instance of my mental model not having adjusted.
palata · a year ago
> In sway I'd pop open the new window, then drag it to the top or bottom half of the window I want it to share horizontal space with

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

j45 · a year ago
Thanks, I will try it out to see if it can first solve my main problem - I'm looking for a way on Mac for it to reasonably remember the screen layouts.

Every 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).

tln · a year ago
I've resorted to running a shell script every time I plug in.

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.

yoavmmn · a year ago
Wanted this to exist for so long. I’ve started learning Swift to build an app to solve this. Then I discovered HammerSpoon[1] and since I use a HammerSpoon lua script to adjust the windows layout for my different setups: 1. Laptop only mode 2. At home my MacBook screen is closed and connected to 2 external monitors 3. At work my MacBook screen is open and connected to 1 external monitor

The script detects the connected screen UUID and applies the appropriate layout

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

ghotli · a year ago
I use Rectangle on macos for this exact use case. Used to use Yabai but now Rectangle is my daily driver for this sort of thing. I'm going to try this one out but global hotkeys for my windows snapping to the right spots when I plug my laptop in is hard to give up
xyst · a year ago
The days of “it just works” is long gone.
lednax · a year ago
I use spectacle and it’s no longer supported
runjake · a year ago
https://rectangleapp.com is the spiritual successor.
pimlottc · a year ago
Another option is the ShiftIt plugin for Hammerspoon:

https://github.com/peterklijn/hammerspoon-shiftit

borski · a year ago
Switch to Rectangle
pech0rin · a year ago
haven’t used this one but I use yabai and it works exactly as you describe
iyn · a year ago
> Doesn't require disabling SIP

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)

msravi · a year ago
I tried yabai but found switching between macos spaces too slow. I moved to aerospace and I absolutely love the workspace implementation. But I really love yabai's focus-follows-mouse feature - so is it possible to use yabai just for that while using aerosoace for everything else i3-like?
kcrwfrd_ · a year ago
Fwiw I have yabai configured for instant desktop switching
TachyonicBytes · a year ago
I wonder if following the mouse for focus would be doable without disabling SIP. It's one of the features I didn't even see in other macOS WM.
feep · a year ago
It is, Yabai can do it. I am currently using autoraise. Both work great, barring UI weirdness of macOS.

Example. Mousing over another window on the way to the menubar.

https://github.com/sbmpost/AutoRaise

samatman · a year ago
The problem with focus-follows-mouse on macOS is the top menu bar.

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.

bashinator · a year ago
I've been searching for a sloppy-mouse-focus implementation for OSX for _years_. Pretty sure there's something fundamentally incompatible in how app windows are managed.
jamil7 · a year ago
Should be possible using AX APIs on mac, might not be all that performant, however.
filereaper · a year ago
Yup there's AutoFocus which I use daily with Aerospace

https://github.com/synappser/AutoFocus

SZJX · a year ago
This is great! I've been using Amethyst so far, but I immediately liked Aerospace more. The main gripe I have with Amethyst is that it throws windows in a very sluggish and unreliable fashion. With Aerospace, windows get moved to different workspaces/monitors in a flash and the move never fails. I also like how it completely ditches MacOS built-in workspaces, which, as the author argued, is rather unsatisfactory, in favor of its own virtual workspace solution, which finally makes handling a multi-monitor setup a bearable and even somewhat enjoyable experience.

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

l2dy · a year ago
yabai works fine without disabling SIP. I haven't tried Aerospace yet, so can't offer a feature comparison though.
feep · a year ago
Oh, I like the fake Spaces approach.

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/yabaihttps://github.com/lwouis/alt-tab-macoshttps://github.com/FelixKratz/JankyBorders

freeqaz · a year ago
I get around that by using the Stack and I flip between windows with alt+h/alt+j

Command+Tab is global window switch. The ones above are for "local" switching in the context of the workspace.

feep · a year ago
Oh, I know. I use sway — and greatly miss alt-tab (windows-style alt-tab), when I do.

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.

wmstack · a year ago
I have gotten somewhat used to Raycast's window management tools, and it is not really possible to use them with AeroSpace.

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.

dmix · a year ago
Raycast is so good

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.

JZL003 · a year ago
I use yabai pretty heavily, for the past 5 macos versions without disabling SIP on a work computer. I really like it, the tiling is flaky only maybe once every few days (I am doing yabai commands probably once a minute at least) so I bound a keystroke to `yabai --restart-service` and it always comes back immediately

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

anonzzzies · a year ago
I have been trying this for a few months now. I3 is quite perfect and Aerospace is a nice try, but it’s very far from i3; it’s quite flaky. I guess this is because Mac OS X doesn’t actually allow full control like Unix WMs do?

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.

jwells89 · a year ago
Having dabbled in some of this for a hobby project (not a window manager, but adjacent), it’s because the official APIs to do these things with are limited. You end up relying a lot on undocumented private APIs and hacks, which are flaky both due to their undocumented internal-use nature and because the OS isn’t designed to play nice with significant meddling with window/process management, which results in the OS and third party app frequently stepping on each others’ toes.
behnamoh · a year ago
Apple being Apple... gosh they just know how to build hardware but for software they just flop.
xiwenc · a year ago
Got the same issue. I am still to find a WM that can deal with native OSX fullscreen mode.

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.

jitl · a year ago
What is the difference in user experience between this and Yabai? I don’t think the SIP issues for Yabai is a big one, no one I know who uses Yabai disables SIP, and they seem to enjoy it.

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.

freeqaz · a year ago
I have used both extensively and I prefer AeroSpace.

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

Etheryte · a year ago
With Yabai you need to disable SIP if you want to interact with spaces in any way, change the stacking order of windows, and many other things [0]. If you don't use those features, you do you, but for many users those are core features.

[0] https://github.com/koekeishiya/yabai/wiki/Disabling-System-I...