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

Assign space indices to native-fullscreen spaces #117

Closed
dominiklohmann opened this issue Jul 12, 2019 · 7 comments
Closed

Assign space indices to native-fullscreen spaces #117

dominiklohmann opened this issue Jul 12, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@dominiklohmann
Copy link
Collaborator

Discussion / Feature request

Factored out from #116 (comment).

@koekeishiya

Say there are 4 spaces, numbered 1-4 accordingly. After the named Desktop 2, there is a fullscreen space. Would it not make sense to have the fullscreen space be mission-control index 3? I know this breaks with the names given by Apple, which appear to be a simple enumeration of user-spaces - there is no internal name given to spaces (except for the uuid string), which is why I suspect this.

@dominiklohmann

If people wanted the old way back, they could then still do this, assuming there'd also be a "native-fullscreen" attribute for spaces (added it to the list in the first post):

# this only works if the query output is guaranteed to be ordered by appearance
old_index=4
yabai -m space --focus \
    "$(yabai -m query --spaces
        | jq -re "[.[] | select(.\"native-fullscreen\" == 0)][${old_index}].index")"
@koekeishiya koekeishiya added discussion Discussion enhancement New feature or request labels Jul 12, 2019
koekeishiya added a commit that referenced this issue Jul 12, 2019
@koekeishiya koekeishiya removed the discussion Discussion label Jul 12, 2019
@koekeishiya
Copy link
Owner

Implemented on master. The literal mission control index is now used to refer to a space - not the index in the desktop name provided by Apple.

@koekeishiya koekeishiya added the addressed on master; not released Fixed upstream, but not yet released label Jul 12, 2019
@dominiklohmann
Copy link
Collaborator Author

dominiklohmann commented Jul 12, 2019

Bug: Sending a window to a native-fullscreen space in any way needs to be a no-op.

@koekeishiya
Copy link
Owner

Right makes sense - fixed on master.

@dominiklohmann
Copy link
Collaborator Author

Sorry, it's one of those days... what's inconsistent now is that there's no non-zero exit code.

@koekeishiya
Copy link
Owner

Fixed it in a different way.

@koekeishiya
Copy link
Owner

I could only test moving a fullscreen space around on the display it was created on. I fear that it will break when moved to another display and that this might require doing some more reverse engineering in the Dock.app. Could you test this when you have a moment?

@dominiklohmann
Copy link
Collaborator Author

Works fine.

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

No branches or pull requests

2 participants