Dotfiles with the latest changes

This commit is contained in:
2024-10-28 14:02:46 +01:00
parent d39336c479
commit fa6b78a382
108 changed files with 4459 additions and 467 deletions

View File

@@ -1,18 +1,32 @@
#!/bin/sh
# 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
#!/bin/bash
source "$CONFIG_DIR/colors.sh"
if [ $SELECTED = true ]; then
sketchybar --set $NAME background.drawing=on \
background.color=$ACCENT_COLOR \
label.color=$BAR_COLOR \
icon.color=$BAR_COLOR
if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
sketchybar --set $NAME background.drawing=on \
background.color=$ACCENT_COLOR \
label.color=$BAR_COLOR \
icon.color=$BAR_COLOR
else
sketchybar --set $NAME background.color=off \
label.color=$ACCENT_COLOR \
icon.color=$ACCENT_COLOR
sketchybar --set $NAME background.drawing=off \
label.color=$ACCENT_COLOR \
icon.color=$ACCENT_COLOR
fi
if [ "$SENDER" = "aerospace_workspace_change" ]; then
apps=$(aerospace list-windows --workspace $1 | awk -F'|' '{gsub(/^ *| *$/, "", $2); print $2}')
icon_strip=" "
if [ "${apps}" != "" ]; then
while read -r app
do
icon_strip+=" $($CONFIG_DIR/plugins/icon_map_fn.sh "$app")"
done <<< "${apps}"
else
icon_strip=" —"
fi
sketchybar --set $1 label="$icon_strip"
fi