dado3212 / spaces-renamer

💻 Ability to rename desktop spaces on macOS 10.10+
MIT License
1.03k stars 29 forks source link

Could I use this tool to display screen labels from yabai? #51

Closed danijar closed 4 years ago

danijar commented 4 years ago

The yabai window manager lets you assign labels to spaces yabai -m space 1 --label name that can be read via yabai -m query --spaces --space 1 | jq .label. I'm wondering if I could hook that up with Spaces Renamer to show these labels in mission control. Do you have an idea if and how this could be done? Thanks!

dado3212 commented 4 years ago

I'm not sure exactly how this could be done. SpacesRenamer reads the names from ~/Library/Containers/com.alexbeals.spacesrenamer/com.alexbeals.spacesrenamer.plist. If you could hook up a command to write to both, or to somehow write from wherever yabai stores it into that file as well, then that would work. At this time I'm going to mark this as wontfix, because I'm not planning on working on yabai interactions, but feel free to submit a pull request if you want.

danijar commented 4 years ago

I see. Is there a command I need to run to update the names or are they read automatically from file every time? Looking at Wikipedia there seem to be many versions of plist. Which one does SpacesRenamer expect?

Yabai has a command line interface so it's easy to read the label of a space using the command I listed above. I agree that this should not be part of SpacesRenamer but a separate script.

dado3212 commented 4 years ago

The .plist file is just a written NSDictionary. If you open the file locally you should be able to see the format that it's normally written in.

danijar commented 4 years ago

Sounds good, thanks for clarifying.