yabai: init

This commit is contained in:
Nico 2025-10-19 21:01:31 +11:00
parent e3677357e0
commit beaf8a5754
Signed by: nico
SSH key fingerprint: SHA256:XuacYOrGqRxC3jVFjfLROn1CSvLz85Dec6N7O9Gwu/0
6 changed files with 164 additions and 16 deletions

View file

@ -1,13 +0,0 @@
#!/usr/local/bin/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
#sketchybar --set "$NAME" background.drawing="$SELECTED"
if [ $SELECTED = 'true' ]; then
sketchybar --set "$NAME" background.color=0xfff48fb1
else
sketchybar --set "$NAME" background.color=0xffffffff
fi

View file

@ -0,0 +1 @@
aerospace.sh

View file

@ -66,6 +66,32 @@ for sid in $(aerospace list-workspaces --all); do
done
# background.corner_radius=0 \
# Yabai Workspace Indictators
#
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9")
for i in "${!SPACE_ICONS[@]}"
do
sid="$(($i+1))"
space=(
space="$sid"
icon="${SPACE_ICONS[i]}"
background.drawing=true \
icon.drawing=false \
background.height=28 \
background.border_width=0 \
background.padding_right=0 \
background.padding_left=0 \
label.color=$PRIMARY_COLOUR \
label="$sid" \
script="$PLUGIN_DIR/space.sh"
click_script="yabai -m space --focus $sid"
)
sketchybar --add space space."$sid" left --set space."$sid" "${space[@]}"
done
# Focused window title
sketchybar --add item front_app left \
--set front_app icon="󱂬 " \