From 7759036795f79a98b65b96d8c7928cef481d29cf Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 11 Oct 2024 10:00:10 -0700 Subject: [PATCH] use bash for sketchybar aerospace plugin --- .config/sketchybar/plugins/aerospace.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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