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

Native-fullscreen messes up space numbering #266

Open
d-miketa opened this issue Jan 15, 2022 · 3 comments
Open

Native-fullscreen messes up space numbering #266

d-miketa opened this issue Jan 15, 2022 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@d-miketa
Copy link
Contributor

Yabai (and Mission Control) number spaces from left to right, starting from 1, skipping over native-fullscreen apps. simple-bar doesn't skip over native-fullscreen apps and therefore the two numbering schemes can be out of sync if a native-fullscreen app is present between two ordinary spaces.

This becomes a problem if users use Mac OS keybindings to shift between spaces and rely on simple-bar to inform them of the correct space id. (That's precisely my situation.)

It'd be nice to have an option for alternative numbering, where spaces with native-fullscreen apps are skipped over in numbering.

@Jean-Tinland
Copy link
Owner

I see what is happening here, I'll implement a fix this week. :)

Thank you for reporting this!

@Jean-Tinland Jean-Tinland added the bug Something isn't working label Jan 16, 2022
@Jean-Tinland
Copy link
Owner

I took a look at it but I don't know how to handle this situation.

When I query information about all spaces yabai -m query --spaces, I have for example this output:

[{
	"id":1,
	"uuid":"",
	"index":1,
	"label":"web",
	"type":"stack",
	"display":1,
	"windows":[16420, 222, 118, 151],
	"first-window":118,
	"last-window":118,
	"has-focus":false,
	"is-visible":false,
	"is-native-fullscreen":false
},{
	"id":3,
	"uuid":"8EC15FC5-F9F9-4094-9712-B338FEE5FDA7",
	"index":2,
	"label":"dev",
	"type":"bsp",
	"display":1,
	"windows":[16420, 222, 22562, 21998, 16536],
	"first-window":21998,
	"last-window":22562,
	"has-focus":false,
	"is-visible":false,
	"is-native-fullscreen":false
},{
	"id":4,
	"uuid":"830E5D8A-6220-4176-BCFA-0240BE3C8AD3",
	"index":3,
	"label":"social",
	"type":"bsp",
	"display":1,
	"windows":[16420, 222, 13809, 2338],
	"first-window":2338,
	"last-window":13809,
	"has-focus":true,
	"is-visible":true,
	"is-native-fullscreen":false
},{
	"id":103,
	"uuid":"504679AA-BC63-4C5D-A01A-658E4F14C3DF",
	"index":4,
	"label":"",
	"type":"float",
	"display":1,
	"windows":[16420, 22578],
	"first-window":0,
	"last-window":0,
	"has-focus":false,
	"is-visible":false,
	"is-native-fullscreen":true
},{
	"id":5,
	"uuid":"7A43B4CE-71DF-4899-B528-772F820A7B0A",
	"index":5,
	"label":"misc",
	"type":"stack",
	"display":1,
	"windows":[16420, 222],
	"first-window":0,
	"last-window":0,
	"has-focus":false,
	"is-visible":false,
	"is-native-fullscreen":false
},{
	"id":101,
	"uuid":"BA83FC57-2D91-4886-98A3-A7F506ACB64C",
	"index":6,
	"label":"",
	"type":"stack",
	"display":1,
	"windows":[16420, 222],
	"first-window":0,
	"last-window":0,
	"has-focus":false,
	"is-visible":false,
	"is-native-fullscreen":false
},{
	"id":102,
	"uuid":"61EAA041-DB6F-446C-B70B-A0F113EF5622",
	"index":7,
	"label":"",
	"type":"stack",
	"display":1,
	"windows":[16420, 222],
	"first-window":0,
	"last-window":0,
	"has-focus":false,
	"is-visible":false,
	"is-native-fullscreen":false
}]

In simple-bar I'm using the index property to display the space number and in order to send the user on the right space on click.

There is indeed an incoherence with spaces displayed by macos:
Screenshot 2022-01-27 at 08 14 09

The problem I face is if I ignore the native-fullscreen apps, all the spaces after these will have a wrong numerotation from yabai point of vue and yabai -m space --focus 4 will not focus the right space.

Do you have some ideas about this issue? :)

@d-miketa
Copy link
Contributor Author

I use simple-bar on a work laptop without the SIP modification in yabai, so the space focusing command doesn’t work for me. But I can use keybindings set in System Preferences > Keyboard. The two sets of commands, yabai and native, use the two different numbering systems.

  • the yabai system is used for yabai -m space —focus N and in simple-bar
  • the native system is used in native keybindings and the space overview you posted above

It’s impossible to harmonise them without modifying yabai. But perhaps simple-bar could support both and the user could decide to switch based on their choice of keybinding systems?

@Jean-Tinland Jean-Tinland added the enhancement New feature or request label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants