Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide windows in same workspace as where they exist (keep on same monitor when hidden) #219

Closed
freeqaz-figma opened this issue May 7, 2024 · 3 comments

Comments

@freeqaz-figma
Copy link

This is an annoying one and I'm curious to get some input to see what workarounds exist.

Anyway, the issue is that when you have multiple monitors and they all have different DPIs then when a window moves to the "bottom right" and then snaps into focus, it takes a split second for it to re-layout with the new DPI.

I experience this with my laptop because my Mac is on the far right and windows are hidden on the bottom right. My two main, external displays aren't HiDPI displays, so moving windows ... is janky. They flicker and also sometimes it won't even snap to the correct workspace.

It is sufficiently frustrating that I went through the code to try to find if I could make this change myself. I believe that this is the relevant line where the modification would need to be made -- we would need to set the "top left" of the window to be the "bottom right" of the current monitor.

My problem is that I don't know Objective-C at all, so I'm really wandering in the dark here.

As one potential fix, I could try to move my Mac to the left of my desk. Will just require unbolting my monitor stands and stuff which would not be ideal.

Another potential fix would be to move the windows to the bottom right of the "main" display (non-HiDPI display). I can live with the flickering on my Mac display since it's basically just for Spotify. But flipping between my IDE and Browser is very annoying lol.

If you have any advice, let me know. I really love AeroSpace and it has made my Mac experience wayyy better! Thank you so much.

@freeqaz-figma
Copy link
Author

My initial thought was that perhaps moving to the bottom left would work for my use case, but then I realized that keeping windows on the same screen is probably cleaner?

Given that the entire approach to making window management work on Mac is just hacking around the limitations, I'm open to any thoughts. And this is sufficiently motivating for me that I would be willing to learn Swift + XCode to make this happen.

Just let me know what you think would be a reasonable compromise for trying to resolve this and I'll be happy to dig deeper. Cheers!

@nikitabobko
Copy link
Owner

nikitabobko commented May 8, 2024

Hi, the relevant line you found is correct.

I recognize the problem you describe and agree that AeroSpace could be improved here. Also see #149

The potential problem with keeping "virtually hidden" windows on the same monitor is that windows may span across monitors and big part of the window may appear on another monitor (Especially if "Displays have separate Spaces" is disabled)

But I think it's safe to keep the window on the current monitor, if monitor configuration allows it. #149 (comment)

Another approach is to use macOS built-in "Hide application" feature if an app has only a single window. But it's harder to implement and requires tricky code changes. I'd prefer to experiment with this approach myself

My initial thought was that perhaps moving to the bottom left would work for my use case

I don't remember if macOS allows to put windows in the bottom left corner (windows don't jump back, right?)

If macOS allows it then I agree that it'd be better to move windows to the bottom left corner for the far left monitor (or generally speaking, consider both bottom corners and prefer the one which allows to hide windows without moving it to another monitor)

Just let me know what you think would be a reasonable compromise for trying to resolve this and I'll be happy to dig deeper

Feel free to try out the approaches that we described. Thanks!

Please note that I'm on vacation, I don't have access to the computer, and I have limited availability.

@nikitabobko
Copy link
Owner

nikitabobko commented May 22, 2024

Duplicate of #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants