705: macOS Window Management

Great suggestions, Idebritto and @MevetS! I’m using Spaceman, thanks, to you, which is very helpful to my process of separating projects into individual Spaces. It’s not perfect, as there’s an extraneous, bright indicator on the right for a Space #9 I don’t want to know about:

I think what’s happening is that, in order to use Stage Manager in my Spaces, I had to turn on a Mission Control setting, “Displays have separate spaces.” I use a MBP 16 on a laptop stand next to my 27" monitor. I wanted the laptop to be part of Space 2, but then no Stage Manager. So I think the Space 9 indicator, which is bright and draws my eye, is lit because that’s the Space assigned to my laptop’s display. It doesn’t show up in Mission Control; there’s no Desktop 9.

I use a single UW display along with Keyboard Maestro to manage apps and windows. With a tap of Caps Lock + Hotkeys , The windows I want to see appear in the predefined positions and the other window are minimized.

I use bettersnaptool for windows that aren’t in a predefined setup. It works great for my use case.

I love the tip but can’t seem to get it to work. When you mention clicking on the window frame, do you mean just clicking on the app to make it the active app?

*edit: I found the shortcuts unchecked in preferences. I can now move between spaces with the keyboard shortcut. And when clicking and holding (thanks @MevetS ), I can move apps to different spaces!

2 Likes

I received the M2 Pro Mac mini a couple of days ago and have finally set it up with 3 displays. I don’t see the “Assign To - This Desktop” in the Dock icon, and I suspect the reason is that I use the other two display as Extended Display instead of “Main” - this means that I only have the Dock in one display. The other two displays do not have Dock. macOS see these other 2 displays as ONE continuous displays, an extension of the one with the Dock, which explains why this option does not appear.

Just to confirm, do you see 2 Docks, one in each monitor?

Nope, just one dock.

In this context, “Desktop” means “Space”, not “Display”. How many Spaces do you have set up? If just one that may explain why that option is not available.

If you want an application window to appear on a specific Display, then a window manger might be what you are looking for (and you may already know that). As I noted in this post I use two such tools, although if I was setting things up today, I would just use one, Moom.

Good luck getting things set up to your liking.

1 Like

Oh boy, you just saved me tons of time. Each of my monitor has only one Space. And I do not see the Option when I right click on the icon in the Dock. Once I added one space to just one monitor/desktop, the option appeared! THANK YOU!

Before:


image

After:


image

1 Like

Do you know what’s the differences between “All Desktops” and “None”?

None means it is not assigned to any specific desktop, and thus it will appear the one you are on when you open it. And it will stay on that desktop (unless you move it) until you close it. Then the next time you open it, it will appear on the now current desktop.

All desktops means that it will appear on every desktop, but only one at a time. In effect, if follows you from desktop to desktop.

2 Likes

You should write a blog/article on this, man! It was so hard to google for this info. Thank you!

1 Like

Hahaha.

Glad I could help.

Have fun.

Ugh, I went for lunch. The Mac probably went to sleep, or maybe just the display. I came back to see Mail.app changed to a different monitor and one of the Finder windows did not stay where it supposed to stay. SIGH! (I didn’t close these apps, they were where they were until I came back and logged in again).

1 Like

Yep, that is where a window manager comes in handy. You likely know the following already …

If you always have the same windows open you can set them as you want, save the configuration, and then invoke it when needed. And the windows move to their appointed positions.

If it is not the same set of windows then a window manager can be used to ‘throw’ windows to predefined positions.

And some will detect when monitors connect/disconnect and move windows to predefined postions. As the show that prompted this thread discussed, there are plenty of options out there, both free and paid, so try them and see if there is one that works for you.

Good luck and have fun.

1 Like

I’m really annoyed by these windows not staying put in their assigned displays/spaces/desktops, or, they stay put but were resized somewhat (Reeder, I’m looking at you!). I did some research and there are 3rd party apps such as Stay or Later, which will let you saved the state of the windows in each space and restored them. While I have not tried them, I read that these apps need around 4-5 seconds to restore back the windows to their proper position, one by one.

Another annoyance I have is that the new Mac mini does not stay sleep. It wakes up quite often throughout the night and my 3 monitors will light up brightly, then go back to sleep. John Siracusa suggested a tool called SleepAid but reading the blog of the developer tells me that these frequent wake up got worse in Ventura onwards - the system wakes around 4 times AN hour!

With these two things nagging me, I decided that the best solution is NOT to sleep the Mac. I can put the display to sleep using a “sleep” command in Alfred and I set in Settings to prevent Mac from sleeping when the display is off. This seems to solve both my problems[^1]. With the Mac not sleeping, I don’t lose the position of the windows. And my monitors do not wake up unnecessarily since it’s not sleeping anyway!

[^1]: Some apps still like to run away - Reeder and Outlook. But, overall, the experience is much better.

1 Like

Hi @geoffaire, @MevetS, @vitoc, @jr5, @Topre, @baremetal, @tofumac: I see your above mentions of Desktop Spaces.

If you are a Keyboard Maestro user, this group of macros that I shared on the Keyboard Maestro Forum might interest you: Desktop Spaces • Macros to Improve Navigation and Window Management

I just updated the group of macros for the newly released Version 11 of Keyboard Maestro.

6 Likes

Thank you, Jim. I’ll check it out! Good job in keeping the macros updated and sharing them!

2 Likes

You’re welcome, @Topre.

The previous version of the macro group, Version 1.2, did run with under macOS Sonoma and Keyboard Maestro Version 11, but the updated group takes advantage of some of the new features of Keyboard Maestro Version 11, most notably the new trigger When the active space changes.

2 Likes

I just realised a cool feature of Bartender 5 is you can have different colours for the menu bar in different Spaces.
I now have standard grey for my main Space, coral for my hobbies, and blue for my work Space.

5 Likes

Hi, all. For those interested in this topic, I thought I’d share the Keyboard Maestro tools that I use to manage positioning and sizing of application windows (and Keyboard Maestro gui elements) with and without Desktop Spaces.

Like many of you, I’ve used other third-party tools to manipulate windows, but I tend to use Keyboard Maestro if the window management is a portion of a KM macro(s) (and especially if I plan to share the automation with others).

I’ve mentioned the spaces macros a few posts above (and also on Automators Talk). Today I spruced up and shared the window management ones. Both reside on the Keyboard Maestro Forum.

1 Like

Thanks Jim! I’ll check it out. Always looking for an easier way to resize windows and I do have a couple of macros in KM that does that although they are very much hardcoded ways. Most puzzling to me was the inconsistencies that I sometimes faced when it comes to multi monitor. Thanks for working on the macro and making it available for all.

1 Like