I recently launched some macOS Shortcuts in Lunar (https://lunar.fyi/#shortcuts) that can arrange monitors in pre-defined layouts like:
2 Screens Vertically ■̳̲
2 Screens Horizontally ⫍⃮݄⫎⃯
4 Screens in a 3-above-1 configuration ⫍⃮■̳̻⫎⃯
3 Screens in a 2-above-1 configuration ⫍‗⫎
3 Screens Horizontally ⫍⃮▬̲⫎⃯
It's not the same as DisplayPlacer but for a lot of people this could be enough. They are free and can be used without a Lunar Pro license.
For those having trouble with monitors being swapped around by the OS, there's also a Swap screen positions action in Shortcuts that you can bind to a hotkey to quickly fix this. It even swaps rotations, which is especially useful for those using portrait monitors (one at 90° and one at 270°).
Lunar is awesome. Just FYI there is a link in the following text which doesn't work, so i can't actually see an examples.
> Check out the "Shortcuts" page to find some useful pre-made shortcuts that you can add with a click.
Is it possible to snapshot exact screen positioning using shortcuts? I'd like to take a snapshot of all my settings (orientation, refresh rate, hdr settings, and _exact_ screen positioning) and restore using a shortcut when ever it changes.
Thanks! That "Shortcuts" page is still WIP, I hoped to launch it the same day I released the update but life happened.
No, Lunar doesn't have that snapshot functionality because it's really hard to make it work for every possible setup. UUIDs can change between connections and the user can be left with an unusable snapshot. Or, because of how the HDMI/DP connection was negotiated, some display modes might not be available until a disconnect/reconnect cyle.
And it's impossible to detect the problem and convey it to the user when it happens, it mostly looks like an app bug no matter what I try.
But I am planning to add it in the future, at least in a rudimentary form.
Currently using displayplacer with BTT to make keyboard shortcuts.
When moving to different hoteling desks, sometimes the laptop is on the left of the additional monitor and other times on the right. Now I have two keybinds that orient my layout. I've used Lunar specifically for the dim below 0 functionality, (thanks for the ongoing development), I'll have to try the new shortcuts to see if they can replace displayplacer.
The one feature I really want for window management on macOS is the ability to split fullscreen applications horizontally, for my vertical monitor. macOS lets you split a fullscreen app vertically so you can have two on the same screen, but when a monitor is oriented vertically you can still only split the screen vertically, not horizontally. Sigh.
You can get value out of yabai even without disabling SIP to add the hooks into Dock.app. The things it needs that for isn't that long of a list, see the first bulleted list here https://github.com/koekeishiya/yabai/wiki/Disabling-System-I... , maybe you don't need those / can replicate them without yabai?
When I initially read this on that page,
> The following features of yabai require System Integrity Protection to be (partially) disabled:
, I thought that meant "so yabai just won't work at all if you don't disable SIP", but it's not the case at all. I use hammerspoon to deal with spaces, and don't care about window transparency/shadows/animation, and I don't know what "picture in picture for any window" means. I do miss stickiness and per-window floating (which are features I used in XMonad), but it's fine, I'm not going to disable SIP for those.
Particularly, if you just want focus-follows-mouse like in X Windows, yabai gives you that without disabling SIP.
I will also +1 this as an i3wm user. I do use displayplacer and yabai together though. I have two identical external monitors that don't behave well with MacOS. Apparently the monitor's unique id's are not unique in MacOS. This causes MacOS to get them mixed up any time I disconnect from them. I have a keyboard shortcut that uses displayplacer to toggle between the two monitor valid configurations.
This person [0] also had that issue, they found that for their monitors for whatever reason, using the contextual screen IDs instead of the persistent ones always results in a consistent configuration. Might be worth a shot.
Since we're on the topic of tiling manager, I'm still using ShiftIt on my old macbook and I still think it's one of the best window manager since it allows you bind keys to particular actions and stays out of the way with minimal configuration. It's not being maintained though.
I noticed this as well. Now if i have to rearrange i try to remember to open spotlight (CMD+Space) and type "arrange".. will take you straight to the option.
I was stoked to see this, unfortunately, this has gone 4 years without a release (last released in 2019)
The issue log has several issues where Ventura users mention it not working at all, on M1 architectures. Can anyone on an M1 or M2 confirm this works for them? I'm still on Intel.
Great timing. Today I discovered that the iMac 24" screen can't be rotated. I have it on a VESA mount, so I can rotate it physically, but screen rotation settings are inaccessible (even with the Option key) via system settings. When I attempt rotation via displayplacer (tool in OP), it just complains that it "could not find res". There's a surprising lack of good search results on this. Seems to be related to the iMac overheating, but that's information coming from a random forum post that I found, not from Apple.
Edit: found Display Rotation Menu via DisplayPlacer Github issues, which is so far the only tool that worked for me.
Do any of these methods work to rotate a Sidecar display? Right now I’m using BetterDisplay to creat a dummy and then rotate and stream that dummy to the Sidecar display, but it’s a bit unwieldy and sometimes unreliable (due to an Apple bug apparently).
Unfortunately not, the system reports false for canChangeOrientation on a Sidecar display:
mac-utils ./bin/RotateDisplay sidecar 0
ID UUID Can Change Orientation Orientation Name
1 37D8832A-2D66-02CA-B9F7-8F30A301B230 true 0° Built-in Liquid Retina XDR Display
6 BF8D0007-9573-49E5-8130-75991ECB2F15 false 0° Sidecar
4 FB46E28E-5B98-475A-A610-C15237238C8D true 0° LG Ultra HD
The display does not support changing orientation: Sidecar [ID: 6]
This hasn't been updated in a while. What I really want from this kind of tool is the ability to take a snapshot of my ALL display settings, and just click something on my desktop or bind a keyboard shortcut, or run a command which will restore it - exactly how it should be. This would include, exact screen positioning, refresh rate, resolutions etc.
I don't know what triggers it, but MacOS is really bad at changing these settings if you use multiple displays through the week (e.g. different coworking spaces).
It might not have been updated but it works perfectly. Also it does everything you just asked for except invocation (you have to setup the keybind yourself, for myself I have an Alfred workflow I run to do it).
Here is an example of a displayplacer command (it will generate this for you based on your current config, you just need to save and re-run it to get back to that state):
The closest I've found to doing this is Mosaic. I paid for it because it was so useful. You can bind keyboard shortcuts and make any selected window snap to a particular screen and size. With the introduction of Ventura's Stage Manager (which is a poorly disguised Task Bar that should be at the bottom of the screen occupying all the unused real estate next to/around the dock), I can use Mosaic to snap my windows to the fullest size possible while still being able to see Stage Manager and this gives me a window management experience on Mac that is almost as good as Windows.
The problem that I have with my M1 is that I have 2 HP monitors with USB-C connectors and when I plug the USB/C Thunderbolt cable in to the monitor, often its not recognized and I often need to power off the machine, the monitor and or switch the ports in some combination, I really wish I could just have a manual probe I could run reliably to tell macOS,the monitor that they are connected. Any ideas?
As far as I understand, there is a low level race condition here. The order that the monitors come alive and initialize with the OS is non deterministic. This can cause the left monitor and the right monitor, for example, to swap IDs.
Does this somehow make settings more persistent than the System Pref^H^H^H^H Settings panel? Ventura has this infuriating bug where every single time it goes to sleep it forgets everything about the monitors I have plugged into my Thunderbolt dock - resolution, arrangement, refresh rate, everything. It is driving me bonkers.
I used to have two otherwise identical displays, but it still does it for me now that all of my displays are different. Notably, I think this stuff happens more when you have 3+ monitors. I don't remember having as many issues with just two displays.
I never managed to actually fix it. Maybe the links in the sibling comment can be of help there. But I feel like it became less of a nuisance after Monterey. Nowadays, it seems to move my app windows between displays after sleep, but that is resolved by applying the window layout snapshot from Moom.
My exact script seems to be gone — goes to show that I've not needed it for a while now — but the gist of my workaround was:
• I set up my display arrangement the way I wanted,
• followed the instructions in the displayplacer repo to work out a command to reproduce the desired arrangement,
• put the displayplacer command and the AppleSript call to Moom in the same shell script, with a short sleep between the two,
• and created an Alfred action to make it a tiny bit more convenient for myself.
The display arrangement would get out of sorts, but getting it back to my liking was just an Alfred action away.
You don't have to use Alfred or Moom specifically, those are just the convenience utilities I prefer.
I have a setup where I share a screen between two computers (a macOS productivity machine and a Windows gaming laptop / x86 VM lab). I did look at a lot of tools to be able to disable one of the screens in macOS so I wouldn't need to fiddle with cables, and I remember that this one didn't work.
I use mirror-displays[1] (alongside Bunch, which also turns on VBAN Talkie for audio) now. Mirroring a screen is the only way to approximate disabled screens.
if you have multiple cables attached to the monitor, isn't it easier to use the monitor's input selection buttons to do this? with the monitors i have, when i manually switch inputs, it signals to the other computer the monitor is no longer available and my mac auto switches like was not plugged in. when i switch back to the mac's input for the monitor, the mac auto recognizes it is available and reconfigures the layout. all as i was expecting it to do
The latest code on the master branch of displayplacer supports this. Run `displayplacer "id:34686E82-0CED-DF86-AFC7-AA1A8EB5CFC0 enabled:false"` with your screen ID and it will set the screen to all black plus remove the screen from the view of the OS. I'll cut the next release version after I add native Apple silicon support.
The feature is especially useful if you want to turn them off in software and keep them still connected to the Mac so that you can turn them on at a later time using a hotkey for example.
If you simply want to turn them off completely, just like you would press the physical power button of the monitor, then Lunar can do that by sending a DDC toggle power command, but there are some caveats to be aware of:
works only if the monitor can be controlled through DDC (most monitors work)
can't be used to power on the monitor
when a monitor is turned off or in standby, it does not accept any commands from a connected device
The latest code on the master branch of displayplacer supports this. Clone the repo and run `make` to build it. Run `displayplacer "id:34686E82-0CED-DF86-AFC7-AA1A8EB5CFC0 res:1440x2560 enabled:false"` with your screen ID and it will set the screen to all black plus remove the screen from the view of the OS.
I had a rather expensive monitor that would sometimes refuse to wake up. I ended up scripting an Alfred keystroke to use AppleScript and System Preferences to toggle the resolution, which would wake up the screen. This would be easier, as I could simply SSH in from another machine.
displayplacer is an awesome tool that I've mentioned on HN a number of times before. I have my displayplacer command setup to be run by Alfred so that when I connect my monitors I can just invoke Alfred, type "disp", and hit enter.
The next step would be to have it auto-run when monitors were attached but this works well enough for me. displayplacer for monitor alignment, phoenix for window management, and my own hacked together mousejump for jumping over the monitor gaps make for an awesome experience.
This is what I’m looking for too. I have three places I plug in displays: home office, work office, no displays (coffee shop). I have specific windows I want in specific places when plugged into external displays at home or work. Browser, Remote Desktop tool, chat client, etc. Every time I come back from the coffee shop, I have to manually re-arrange my windows. First world problem I know but every time I think “it should be smart enough to land these windows in this spot”
Similar with code editors: it should be smart enough to re-arrange my docks based on screen size. When I have big screen, expand side and bottom sub-windows. When I’m just on laptop screen, auto hide them.
Ivan Sapozhnik (https://twitter.com/iSapozhnik) is working on adding this to his Lasso app (https://thelasso.app/). It's not an easy problem to solve as there's no API that can just save and restore windows, a lot of inventive solutions have been tried and failed.
Do you know of any specific writeups? I couldn't find any obvious results, but I'm curious where the difficulties lay. Tbh, I'd be happy with just "windows with this parent process go here" list - I wonder how far off that is.
I don't have any link on hand right now for a writeup, but I've followed yabai's (https://github.com/koekeishiya/yabai) development closely ever since it was called kwm and saw the limitations of macOS's public API to managing windows.
The windows with this parent process go here thing can be solved easily, and can even be done as a one-liner with yabai. Example of moving all the windows of Sublime Text to display 2:
It can even be automated by adding a rule in ~/.yabairc (although that might be undesirable as it will always be enforced even if you want to move the window manually):
well when saying screenshot I of course figured that the idea of multiple screenshots, perhaps also with some explanatory text, would be implied, but yeah sure some photos would also be good.
I've seen a few comments mention the description now. Thank you for the feedback. I wrote displayplacer because all the other tools were GUIs and I needed something scriptable. Consider using SwitchResX for a multi-display profile GUI tool.
For those having trouble with monitors being swapped around by the OS, there's also a Swap screen positions action in Shortcuts that you can bind to a hotkey to quickly fix this. It even swaps rotations, which is especially useful for those using portrait monitors (one at 90° and one at 270°).