fix: start AeroSpace and request SketchyBar permissions after setup - #158
Merged
Merged
Conversation
CollieIsCute
added a commit
that referenced
this pull request
Sep 14, 2026
…158) ## 變更 - macOS 安裝流程末尾以 `run_once_after_9-start-aerospace.sh` 開啟 AeroSpace,交由上游請求輔助使用權限並啟動 SketchyBar;CI 不啟動 GUI。 - 在列出原生圖示之前執行 `sketchybar --query default_menu_items`,使用上游內建的螢幕錄製授權請求,避免因權限不足跳過 alias 後連提示都不出現。 - README 更新首次授權、拒絕後手動開啟,以及「關閉 SketchyBar,再關閉並重開 AeroSpace」的操作。 沒有新增依賴、授權 helper、常駐服務或功能測試腳本。沒有更動 SIP、TCC、既有 UI、workflow 或 `-v`。`sketchybar-plan.html` 只更新本機,未追蹤或推送。 ## 驗證 - [x] `git diff --check`、SketchyBar 設定及渲染後 hook 的 `sh -n`。 - [x] 模板在 Linux/Windows 輸出為空;macOS 的 `CI=true` 路徑不執行 `open`。 - [x] 經 chezmoi 實際套用設定與首次啟動 hook;第二次 dry-run 沒有再次執行 hook。 - [x] 已授權現機 reload 正常;原生 menu 查詢回傳非空 JSON,12 個元件外觀屬性與修改前一致。 - [ ] 未授權新機:首次提示、允許/拒絕、授權後完整重啟,仍待該環境實際驗收。本次未重設現機權限,不將已授權測試當成此項通過。 - [ ] 四平台安裝 CI:`c0dfa8efdefd374521c1d7e0208143f150f0a028` 的 macOS/Arch/Ubuntu 已通過;[Windows 三輪皆在下載階段失敗](https://github.com/CollieIsCute/dotfiles/actions/runs/34857855261),尚未全綠。 Windows 第一次下載 KeePassXC 2.7.12 收到 HTTP 504;第二次回報 `error retrieving GitHub release latest`;第三次取得 chezmoi 2.72.2 版本後,`DownloadString` 再次收到 HTTP 504。後兩次尚未執行 dotfiles。已單獨重跑兩次,停止連續重試,待下載服務恢復後再驗證;未修改 Windows 安裝程式、套件或略過安裝。 可重跑的 CI 分支檢查(macOS,不啟動 GUI): ```sh trace=$(chezmoi execute-template -f home/.chezmoiscripts/run_once_after_9-start-aerospace.sh.tmpl | CI=true sh -x 2>&1) case "$trace" in *'/usr/bin/open'*) exit 1 ;; esac ``` ## 範圍界線 這個 MR 只補首次啟動與授權入口,不宣稱完整的新機零設定安裝。原生選單列自動隱藏仍依 README 手動設定;Homebrew 初次初始化的 PATH、separate-Spaces 設定衝突與原生 App 的 3 秒啟動等待不在這次修改範圍。 依據:[SketchyBar 2.24.0 的原生授權請求](https://github.com/FelixKratz/SketchyBar/blob/v2.24.0/src/alias.c#L125)、[AeroSpace 的授權及啟動順序](https://github.com/nikitabobko/AeroSpace/blob/v0.21.3-Beta/Sources/AppBundle/initAppBundle.swift#L9)。
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.
變更
run_once_after_9-start-aerospace.sh開啟 AeroSpace,交由上游請求輔助使用權限並啟動 SketchyBar;CI 不啟動 GUI。sketchybar --query default_menu_items,使用上游內建的螢幕錄製授權請求,避免因權限不足跳過 alias 後連提示都不出現。沒有新增依賴、授權 helper、常駐服務或功能測試腳本。沒有更動 SIP、TCC、既有 UI、workflow 或
-v。sketchybar-plan.html只更新本機,未追蹤或推送。驗證
git diff --check、SketchyBar 設定及渲染後 hook 的sh -n。CI=true路徑不執行open。c0dfa8efdefd374521c1d7e0208143f150f0a028的 macOS/Arch/Ubuntu 已通過;Windows 三輪皆在下載階段失敗,尚未全綠。Windows 第一次下載 KeePassXC 2.7.12 收到 HTTP 504;第二次回報
error retrieving GitHub release latest;第三次取得 chezmoi 2.72.2 版本後,DownloadString再次收到 HTTP 504。後兩次尚未執行 dotfiles。已單獨重跑兩次,停止連續重試,待下載服務恢復後再驗證;未修改 Windows 安裝程式、套件或略過安裝。可重跑的 CI 分支檢查(macOS,不啟動 GUI):
範圍界線
這個 MR 只補首次啟動與授權入口,不宣稱完整的新機零設定安裝。原生選單列自動隱藏仍依 README 手動設定;Homebrew 初次初始化的 PATH、separate-Spaces 設定衝突與原生 App 的 3 秒啟動等待不在這次修改範圍。
依據:SketchyBar 2.24.0 的原生授權請求、AeroSpace 的授權及啟動順序。