fix(sketchybar): aerospace ワークスペース表示が切替時に更新されない問題を修正 - #90
Merged
Conversation
切替イベント (aerospace_workspace_change) でバーの表示が更新されなく なっていた。原因は 2 つ。 1. space_creator が drawing=off + updates=when_shown だったため、表示の 再計算を担う space_windows.sh がイベントで一切実行されない。空ワーク スペースを drawing=off にした e8816be 以降、空→フォーカス時に drawing を 戻す再計算が動かず、フォーカスしても表示されないままになっていた。 → space_creator に updates=on を明示。 2. space_windows.sh のハイライト処理が focused と prev しか触っておらず、 キーバインドは AEROSPACE_PREV_WORKSPACE を渡さないため取り残しが発生。 個別 space.sh との二重管理でレースにもなっていた。 → focused だけ ON・他は全て OFF に全ワークスペースを確定させる方式へ変更。 実行順に依存せず最終状態が一致する。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gapul
enabled auto-merge (squash)
July 28, 2026 08:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
症状
aerospace のワークスペースを切り替えても sketchybar のバー表示(ハイライト・空ワークスペースの表示/非表示)が更新されない。
原因
切替イベント
aerospace_workspace_changeで、表示を更新すべきスクリプトがどちらも走っていなかった。space_creatorがdrawing=off+updates=when_shown— 非表示アイテムはイベントを受け取らないため、表示の再計算を担うspace_windows.shが一度も実行されない。空ワークスペースをdrawing=offにした e8816be 以降、空→フォーカス時にdrawingを戻す再計算が動かず、フォーカスしても表示されないままになっていた。space_windows.shのハイライトが focused/prev しか触らない — キーバインドはAEROSPACE_PREV_WORKSPACEを渡さないため取り残しが発生。個別space.sh(space 型アイテムは aerospace 環境だとupdatesが実質 off)との二重管理でレースにもなっていた。修正
items/spaces.sh:space_creatorにupdates=onを追加。非表示でも毎イベントでspace_windows.shを実行させる。plugins/space_windows.sh: ハイライトを「focused だけ ON・他は全て OFF」で全ワークスペース確定に変更。実行順に依存せず最終状態が一致する。検証
修正版
space_windows.shを直接実行し、空/非空・切替往復の全パターンで最終状態が正しいことを確認(focused のみ highlight=on、空の focused は表示、それ以外の空は非表示)。🤖 Generated with Claude Code