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

Accommodate for stagemanager in Mac OS 13 (Ventura) #29

Open
berry opened this issue Nov 25, 2022 · 4 comments
Open

Accommodate for stagemanager in Mac OS 13 (Ventura) #29

berry opened this issue Nov 25, 2022 · 4 comments

Comments

@berry
Copy link

berry commented Nov 25, 2022

Mac OS 13 features Stage Manager. A portion of the left side of the screen is reserved for quick access to apps. It would be nice when cycling through hyper-left/right the window expands up to the border of stage manager of starts at the border of stage manager.

This is probably quite easy to accomplish, but I haven't look into it yet.

PS. Thanks for Miro Windows Manager. For years now I am a happy user.

@nrgetik
Copy link

nrgetik commented Jan 25, 2023

@berry I am looking to accommodate this as well in some fashion. In the code, we see:

--- MiroWindowsManager.fullScreenSizes
--- Variable
--- The sizes that the window can have in full-screen. 
--- The sizes are expressed as dividend of the entire screen's size.
--- For example `{1, 4/3, 2}` means that it can be 1/1 (hence full screen), 3/4 and 1/2 of the total screen's size
obj.fullScreenSizes = {1, 4/3, 2}

--- MiroWindowsManager.GRID
--- Variable
--- The screen's size using `hs.grid.setGrid()`
--- This parameter is used at the spoon's `:init()`
obj.GRID = {w = 24, h = 24}

Naively, I modified the obj.fullScreenSizes to include values like 5/4 as a test to see if I could get an 80% coverage with a particular window. It didn't work - when cycling, it either made the window full-size or 75% depending on what was in the variable.

After, I played with the obj.GRID value to see if there was some rounding going on. I made it as high as 512x512 to no avail.

The function in question is function obj:_nextFullScreenStep(), but I can't conceive of what is going on in that function well enough to understand why my naive approach didn't work.

@miromannino can you enlighten us?

@nrgetik
Copy link

nrgetik commented Jan 25, 2023

I found this thread and comment and tried exactly that same approach instead of my own, and it didn't work. I had no other option but fullscreen.

@nrgetik
Copy link

nrgetik commented Jan 25, 2023

Aha. It all works as expected if one disables Stage Manager, rather defeating the purpose...

Well, I'm not sure why, but after cycling Stage Manager off and back on, and using the following configuration in ~/.hammerspoon/init.lua :

spoon.MiroWindowsManager.sizes = { 6/5, 4/3, 3/2, 2/1 }
spoon.MiroWindowsManager.fullScreenSizes = { 1, 6/5, 4/3, 3/2 }

I've got something that approximately does what I want when interacting with Stage Manger. FYI @berry

@berry
Copy link
Author

berry commented Jan 26, 2023

Thank you for looking into this. I am currently using this setting:

spoon.MiroWindowsManager.sizes = {12/4, 12/11, 12/6, 12/8 }

It works quite well. But, it would be nice if you could distinguish between the on and off status of stagemanager.

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