Skip to content

Commit

Permalink
Update yabai.1d.sh
Browse files Browse the repository at this point in the history
Added support for grouping space indicators by monitor.
  • Loading branch information
SxC97 authored Dec 11, 2020
1 parent 1d07805 commit 8f2accc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions yabai.1d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ WINMANAGED="⦾"
WINLEFT=" "
WINRIGHT=" "

# Set left and right separators for displays
DISPLAYLEFT=" "
DISPLAYRIGHT=" "

# -------------------------------------------------------------------------#
# Don't edit anything below this point if you dont know what you're doing! #
# -------------------------------------------------------------------------#
Expand All @@ -118,6 +122,16 @@ TOTAL=$(yabai -m query --spaces | jq '. | length')
STRING="$DEFAULT$LEFT"
i=1

for DISPLAY in $(yabai -m query --displays | jq '. | length'); do
VAR=$(yabai -m query --displays --display $DISPLAY | jq '.spaces | .[0]')
SPACES[VAR]=$DISPLAYLEFT$SPACES[VAR]
done

for DISPLAY in $(yabai -m query --displays | jq '. | length'); do
VAR=$(yabai -m query --displays --display $DISPLAY | jq '.spaces | .[-1]')
SPACES[VAR]=$SPACES[VAR]$DISPLAYRIGHT
done

if [ "$STYLE" = "NUMBER" ]; then
while [ $i -le $TOTAL ]; do
if [ $i -eq $CURRENT ]; then
Expand Down

0 comments on commit 8f2accc

Please # to comment.