Get the top HN stories in your inbox every day.
idle_zealot
nbobko
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
└── window3idle_zealot
Ah, so it does. I suppose this is an instance of my mental model not having adjusted.
squigz
For what it's worth, this video from i3 really helped me visualize how i3 and related WMs deal with windows - https://www.youtube.com/watch?v=AWA8Pl57UBY
palata
> 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
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
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
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
j45
Thanks, I'll check it out. This looks great.
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.
ghotli
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
lednax
I use spectacle and it’s no longer supported
runjake
https://rectangleapp.com is the spiritual successor.
alostpuppy
This is my first install on every new Mac
pimlottc
Another option is the ShiftIt plugin for Hammerspoon:
borski
Switch to Rectangle
pech0rin
haven’t used this one but I use yabai and it works exactly as you describe
iyn
> 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
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_
Fwiw I have yabai configured for instant desktop switching
msravi
That's what I thought I did, but I can't, for example, just move to space 7 or something. I need to create a new space with a number I can't control and switch to that. That new workspace might not be next to the previous space I was working in, so I need to cycle through multiple spaces. Aerospace on the other hand just lets you choose a numbered workspace and work with that.
Would love to see your yabairc if you can share.
undefined
TachyonicBytes
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
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.
samatman
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.
barnabee
I have an Alfred workflow to search the menu, so not being able to move the mouse there isn’t a big issue.
bashinator
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.
speedgoose
Looks like Hammerspoon and some lua should do:
lelandfe
It's also a bummer because Terminal.app has the functionality out of the box: https://macos-defaults.com/mouse/focusfollowsmouse.html
jamil7
Should be possible using AX APIs on mac, might not be all that performant, however.
filereaper
Yup there's AutoFocus which I use daily with Aerospace
SZJX
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
yabai works fine without disabling SIP. I haven't tried Aerospace yet, so can't offer a feature comparison though.
feep
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/yabai https://github.com/lwouis/alt-tab-macos https://github.com/FelixKratz/JankyBorders
freeqaz
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
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.
irth
you can get windows-style alt-tab with https://alt-tab-macos.netlify.app/
wmstack
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
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
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
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
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
Apple being Apple... gosh they just know how to build hardware but for software they just flop.
jwells89
In fairness, I’ve encountered similar flakiness when using third party window/desktop manager utilities on Windows. Commercial OSes in general just aren’t designed with that kind of flexibility in mind.
xiwenc
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
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
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
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...
maherbeg
I'd be curious to know how it is different than Amethyst. Amethyst has gotten much more stable recently and I really enjoy using it. The text based config seems pretty nice at a first glance, but I'm not sure if it's worth switching.
SZJX
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.
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.
Avi-D-coder
in my experience aerospace is way better in most ways.
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.
thisrod
> in my experience aerospace is way better in most ways.
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.
matricaria
You can do text based configuration in Amethyst too.
https://github.com/ianyh/Amethyst/blob/development/docs/conf...
meter
I’ve been using this for the past few months, and for the most part, I like it. I appreciate that it’s all configured with a single file (no GUI).
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
i-am-a-fnord
Yabai suffers from the same problem, so far the creator hasn't been able to fix it.
bsnnkv
Nice to see another twm on macOS.
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.
bbor
Not to drop this kind hacker’s competitor, but I’ve been a happy user of https://rectangleapp.com/. Will definitely be checking this out instead tho, even though I’ve paid for rectangle — any demo that has SublimeText windows in it is a demo I trust!
ashenke
I'm curious, what kind of features that are not found on Linux ?
Carrok
For one, tools like Shortcat aren’t really possible on Linux afaict, since it relies on MacOS’s fantastic accessibility API.
herewulf
> Search and summon windows > > Shortcat lets you search window titles for more precise multi-tasking.
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.
ssivark
Hmm -- interesting/fantastic tool. Feels something like avy in Emacs, but for everything on screen.
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.
bsnnkv
The biggest QOL improvements imo are found in the approach to the user-facing API design.
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
```FranOntanaya
Clicklock is much nicer in Windows than the awkward methods I've found so far with Linux.
andrewla
I'm reluctant to try this -- my experience with other attempts to try out tiling window managers on MacOS is that the just don't play nice. Windows get repositioned by normal interactions and the window manager is not able to wrangle them, and connecting external monitors is a disaster, and you end up with a situation where windows are overlapping in odd ways but you can't move them out of the way because the window manager is trying to manage them.
Does anyone have experience with this particular one and does it resolve these sorts of issues?
nbobko
Hi, AeroSpace author speaking :)
> 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
mrgaro
I'm a long time Amethyst user, but going to try AeroSpace out!
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?
nbobko
When I started the project, I kept it simple, so I started with the static config
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
torstenvl
I've never ever had that happen with Rectangle or Magnet.
Get the top HN stories in your inbox every day.
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.