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.
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.