nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
7.62k stars 125 forks source link

Sketchybar no longer highlights the active workspace in 0.15.1 #585

Closed voidpointer0 closed 1 month ago

voidpointer0 commented 1 month ago

Since the latest update my sketchybar doesn't highlight the active space (I have a list of workspaces in the bar, the active one was properly highlighted before today's update).

items/aerospace.sh

#!/bin/sh

#Define icons for workspaces
SPACE_ICONS=("1 " "2 󰙯" "3 " "4 " "5 " "6 󰖟" "7 " "8 " "9 󰖟" "10 󰚯")
for sid in $(aerospace list-workspaces --all); do
  # Get the icon for the current workspace
  ICON="${SPACE_ICONS[$((sid - 1))]}"

  sketchybar --add item space.$sid left \
    --subscribe space.$sid aerospace_workspace_change \
    --set space.$sid \
    background.color=$BACKGROUND_1 \
    background.corner_radius=5 \
    background.height=20 \
    background.drawing=off \
    label="$ICON" \
    padding_left=4 \
    padding_right=4 \
    click_script="aerospace workspace $sid" \
    script="$CONFIG_DIR/plugins/aerospace.sh $sid"
done

# Handle workspace changes
sketchybar --add event aerospace_workspace_change \
  --subscribe space.* aerospace_workspace_change

plugins/aerospace.sh

#!/usr/bin/env bash

source "$CONFIG_DIR/colors.sh"

if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
  sketchybar --set $NAME label.color=$BOG_GREEN
else
  sketchybar --set $NAME label.color=$DEATHLY_GRAY
fi

sketchybar --set $NAME order=3

Checklist

aerospace CLI client version: 0.15.1-Beta 2c3924fa1a9c0e7a51b7afd8d5c25f3d76492118
AeroSpace.app server version: 0.15.1-Beta 2c3924fa1a9c0e7a51b7afd8d5c25f3d76492118
nikitabobko commented 1 month ago

Sorry, I'm not going to analyze your scripts and how aerospace interferes with sketchybar (I don't use sketchybar)

Please break down your bug report and exclude sketchybar from the equation

nikitabobko commented 1 month ago

Nevermind, I think I accidentially realized what the problem was. Fixed in 0.15.2