Currently Visible Space Names #1564
-
I'm trying to understand Jesse Skelton's switchAndFocusSIP.sh script to see if I can get it to work. I'm currently focusing on this line: CurrentlyVisibleSpaceNames=$(yabai -m query --spaces | jq -re ".[] | select(.visible == 1)" | jq -re ".label") If I run it in the command line it returns nothing. If I run just this part I see that there's and .is-visible property:
How do I modify this line to return the labels of visible spaces? yabai -m query --spaces | jq -re ".[] | select(.visible == 1)" | jq -re ".label" I've tired changing .visible to .is-visible but I get an error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The following should do what you want: |
Beta Was this translation helpful? Give feedback.
The following should do what you want:
yabai -m query --spaces | jq -re '.[] | select(."is-visible" == true)' | jq -re '.label'