feat(sketchybar): rebuild sketchybar config

This commit is contained in:
js0ny 2025-03-03 22:39:12 +00:00
parent d93d153827
commit 0af876301c
27 changed files with 615 additions and 1059 deletions

View file

@ -1,7 +1,17 @@
#!/bin/sh
#!/usr/bin/env bash
# The $SELECTED variable is available for space components and indicates if
# the space invoking this script (with name: $NAME) is currently selected:
# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors
sketchybar --set "$NAME" background.drawing="$SELECTED"
SPACE_CLICK_SCRIPT="yabai -m space --focus $SID 2>/dev/null"
if [ "$SELECTED" = "true" ]; then
sketchybar --animate tanh 5 --set "$NAME" \
icon.color="$RED" \
icon="${SPACE_ICONS[$SID - 1]}" \
click_script="$SPACE_CLICK_SCRIPT"
else
sketchybar --animate tanh 5 --set "$NAME" \
icon.color="$COMMENT" \
icon="${SPACE_ICONS[$SID - 1]}" \
click_script="$SPACE_CLICK_SCRIPT"
fi