FelixKratz / SketchyBar

A highly customizable macOS status bar replacement
https://felixkratz.github.io/SketchyBar/
GNU General Public License v3.0
5.25k stars 82 forks source link

Active/unfocused differentiation for multi-monitor spaces #502

Closed shajra closed 5 months ago

shajra commented 5 months ago

Maybe it's because I use slightly subdued colors for my borders or keep my borders on the thinner side, but I find it hard to tell which monitor is in focus. This is because I'm leaning so heavily on the color of the space item in SketchyBar as a visual cue.

I do get the chevron of the "space_creator" to tell me which monitor is active because it uses the "associated_display" setting. So, I'm not lacking critical functionality.

I'm looking for another environment variable to complement env.SELECTED, maybe like env.ACTIVE. This would be closer to what i3 and sway do on the Linux side.

I have SketchyBar, SBarLua, Yabai, and Skhd dialed in quite a bit. So thanks a lot for all your work. Having used this setup for a couple of weeks now, this is the last of my few requests for new features.

FelixKratz commented 5 months ago

You could acquire this additional variable from e.g. yabai via:

ACTIVE="$(yabai -m query --displays --display | jq ".index")"

or alternatively you could subscribe to the display_change event and store the id of the active display (send in INFO) somewhere and read it while you handle the space_change event.

shajra commented 5 months ago

Thanks for the tips. I got it to work the second way. If anyone finds this issue and wants to see something more concrete and complete, here's a link where I do this in my configuration.