sketchybar: use drawing directly instead of individual options

instead of using background.drawing and label.drawing to change
visiblity, now just use the drawing option instead.
This commit is contained in:
Nico 2025-10-05 23:42:28 +11:00
parent 99c487f0be
commit 7bf0f2e8ea
Signed by: nico
SSH key fingerprint: SHA256:XuacYOrGqRxC3jVFjfLROn1CSvLz85Dec6N7O9Gwu/0
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@
SONG="$(osascript -e 'tell application "Music" to if player state is playing then artist of current track & " - " & name of current track')" SONG="$(osascript -e 'tell application "Music" to if player state is playing then artist of current track & " - " & name of current track')"
if [[ "$(echo $SONG | wc -w | sed 's/ //g')" != "0" ]]; then if [[ "$(echo $SONG | wc -w | sed 's/ //g')" != "0" ]]; then
sketchybar --set "$NAME" label="${SONG}" background.drawing=true icon.drawing=true sketchybar --set "$NAME" label="${SONG}" drawing=true
else else
sketchybar --set "$NAME" label="" background.drawing=false icon.drawing=false sketchybar --set "$NAME" label="" drawing=false
fi fi

View file

@ -79,14 +79,14 @@ sketchybar --add item music left \
click_script="osascript -e 'tell application \"Music\" to playpause'" \ click_script="osascript -e 'tell application \"Music\" to playpause'" \
background.padding_right=0 \ background.padding_right=0 \
background.padding_left=0 \ background.padding_left=0 \
background.drawing=false \ drawing=false \
scroll_texts=1 \ scroll_texts=1 \
label.max_chars=50 \ label.max_chars=50 \
label.scroll_duration=500 \ label.scroll_duration=500 \
background.color=$PRIMARY_COLOUR \ background.color=$PRIMARY_COLOUR \
icon.color=$BACKGROUND_COLOUR \ icon.color=$BACKGROUND_COLOUR \
label.color=$BACKGROUND_COLOUR \ label.color=$BACKGROUND_COLOUR \
icon.drawing=false drawing=false
# #
# Adding Right Items # Adding Right Items