Skip to content

Refer to spaces that have apps inside of them #248

Answered by FelixKratz
itaysharir asked this question in Q&A
Discussion options

You must be logged in to vote

You can do so with yabai, assuming you use the default config, just replace the space.sh plugin script with this one:

#!/usr/bin/env sh

WIN=$(yabai -m query --spaces --space $SID | jq '.windows[0]')
HAS_WINDOWS="true"
if [ "$WIN" = "null" ];then
  HAS_WINDOWS="false"
fi
sketchybar --set $NAME background.drawing=$SELECTED icon.highlight=$HAS_WINDOWS

and define a icon.highlight_color for all spaces.

Caveats:
This only updates once you enter or leave a certain space, if you want all spaces to update every time you would need to implement the spaces logic via a regular item with an attached script, subscribed to the relevant events.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by itaysharir
Comment options

You must be logged in to vote
2 replies
@FelixKratz
Comment options

@itaysharir
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants