nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
5.61k stars 88 forks source link

Forced Monitor Assignment for Secondary Monitor Happens Out of Order of Config #365

Closed ChiefMateStarbuck closed 1 week ago

ChiefMateStarbuck commented 1 month ago

Both the 'Y' and 'U' workspaces are being assigned to a secondary monitor. However 'U' is the default workspace even though 'Y' is assigned first.

[workspace-to-monitor-force-assignment]
Y = 'secondary'
# This line makes U the default workspace on the second monitor even though Y comes first in the config.
# This most likely due the config being read in alphabetical order.
U = 'secondary'

There is no way to assign multiple workspaces to a secondary monitor AND choose a default workspace for said secondary monitor. The suspected issue is that forced assignment happens alphabetically, and not in order of config.

Is there any known way around this? I would be willing to work on a PR for this change.

This is an amazing project. Thank you all for an amazing tilling experience.

nikitabobko commented 1 month ago

What do you mean by "default workspace"? Focused by default?

even though 'Y' is assigned first.

TOML specification says that maps tables are unordered and the library I use to parse TOML doesn't give them in order of declaration

ChiefMateStarbuck commented 3 weeks ago

"default workspace": Similar to running after-startup-command = ['workspace O'] on your main monitor to set a "default workspace", there is is no way to set a "default workspace" for a second monitor.

Example: When a second monitor is detected, the monitor should go straight to workspace 'Y', with workspace 'U' as a backup workspace.

TOML specification says that maps tables are unordered and the library I use to parse TOML doesn't give them in order of declaration

I see. Since order cannot not be guaranteed at the parsing level, aerospace can't guarantee a "default workspace". Aerospace would have to use a different parser or some other mechanism to set a hard "default workspace" for every monitor.