diff --git a/.config/sketchybar/plugins/aerospace.sh b/.config/sketchybar/plugins/aerospace.sh index 8af5127..2859206 100755 --- a/.config/sketchybar/plugins/aerospace.sh +++ b/.config/sketchybar/plugins/aerospace.sh @@ -1,9 +1,10 @@ -#!/usr/bin/env zsh +#!/usr/bin/env bash # Original source: # https://nikitabobko.github.io/AeroSpace/goodness#show-aerospace-workspaces-in-sketchybar -if (($argv[(Ie)$FOCUSED_WORKSPACE])); then +# https://stackoverflow.com/a/47541882 +if printf '%s\0' "${argv[@]}" | grep -F -x -z -- "$FOCUSED_WORKSPACE"; then sketchybar --set "$NAME" label="$FOCUSED_WORKSPACE" background.drawing=on else sketchybar --set "$NAME" label="$FOCUSED_WORKSPACE" background.drawing=off