Fix SketchyBar workspace indicators not appearing after 25.11 upgrade
Add explicit `drawing=on` to all workspace item states (initial creation, focused, non-empty, and empty) to prevent items from getting stuck with `drawing=off`. With `updates=when_shown`, items with `drawing=off` never run their update scripts, causing workspaces that start empty to never appear even when focused or given windows. Changes: - Add drawing=on to initial workspace creation (line 393) - Add drawing=on to focused workspace state (line 568) - Add drawing=on to empty workspace state (line 582) - Add drawing=on to non-empty workspace state (line 591) - Update comment for empty workspace to explain drawing=on usage This ensures workspace indicators automatically appear within 2 seconds when focused or given windows, without needing manual `sketchybar --update`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -390,6 +390,7 @@ in
|
|||||||
${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
|
${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
|
||||||
--subscribe space.$sid aerospace_workspace_change \
|
--subscribe space.$sid aerospace_workspace_change \
|
||||||
--set space.$sid \
|
--set space.$sid \
|
||||||
|
drawing=on \
|
||||||
update_freq=2 \
|
update_freq=2 \
|
||||||
width=32 \
|
width=32 \
|
||||||
background.color=$ITEM_BG \
|
background.color=$ITEM_BG \
|
||||||
@@ -565,6 +566,7 @@ in
|
|||||||
if [ "$IS_FOCUSED" = "true" ]; then
|
if [ "$IS_FOCUSED" = "true" ]; then
|
||||||
# Focused workspace - always show with focused styling
|
# Focused workspace - always show with focused styling
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
||||||
|
drawing=on \
|
||||||
icon="$DISPLAY" \
|
icon="$DISPLAY" \
|
||||||
width=32 \
|
width=32 \
|
||||||
icon.padding_left=13 \
|
icon.padding_left=13 \
|
||||||
@@ -575,8 +577,9 @@ in
|
|||||||
icon.color=$TEXT
|
icon.color=$TEXT
|
||||||
elif [ "$IS_EMPTY" = "true" ]; then
|
elif [ "$IS_EMPTY" = "true" ]; then
|
||||||
# Empty workspace (not focused) - hide by collapsing width and clearing content
|
# Empty workspace (not focused) - hide by collapsing width and clearing content
|
||||||
# Using width=0 + empty icon/label instead of drawing=off because drawing=off doesn't reliably re-show items
|
# Using width=0 with drawing=on so updates=when_shown continues to run the script
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
||||||
|
drawing=on \
|
||||||
icon="" \
|
icon="" \
|
||||||
label="" \
|
label="" \
|
||||||
width=0 \
|
width=0 \
|
||||||
@@ -586,6 +589,7 @@ in
|
|||||||
else
|
else
|
||||||
# Non-empty workspace (not focused) - show with inactive styling
|
# Non-empty workspace (not focused) - show with inactive styling
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
||||||
|
drawing=on \
|
||||||
icon="$DISPLAY" \
|
icon="$DISPLAY" \
|
||||||
width=32 \
|
width=32 \
|
||||||
icon.padding_left=13 \
|
icon.padding_left=13 \
|
||||||
|
|||||||
Reference in New Issue
Block a user