kkga / nibar

Simple Übersicht status bar with yabai support.
MIT License
192 stars 33 forks source link

update spaces script and widgets to work on all displays #9

Closed theshortcut closed 3 years ago

theshortcut commented 3 years ago

Thanks for nibar!

I tend to swap displays fairly regularly from 1 to 2 to 3 screens and Übersicht has some troubles remembering what widgets were displaying on which screen when I do this, also adding a new widget for a third display didn't feel great, so I looked into generalizing the screens shell script and widget to handle whatever display the widget is displayed on.

I found that Übersicht provides the screenId in the pathname provided via window.location. Using this we can resolve the display index with a new yabai --displays query and use that to query all spaces, and display only the spaces per display using a single widget.

kkga commented 3 years ago

That's great! Thanks for contributing!