| 1 | #!/bin/sh |
| 2 | |
| 3 | # 取得作業系統類型(例如 Darwin 表示 macOS) |
| 4 | system_type=$(uname -s) |
| 5 | |
| 6 | # 如果是 macOS 系統,才執行以下區塊 |
| 7 | if [ "$system_type" = "Darwin" ]; then |
| 8 | |
| 9 | # 這裡可以考慮加入使用 Homebrew 安裝 iTerm2 的指令(例如 brew install --cask iterm2) |
| 10 | # 不過目前尚未實作 |
| 11 | |
| 12 | # 檢查使用者家目錄下是否有 .iterm2 設定資料夾 |
| 13 | if [ -d "$HOME/.iterm2" ]; then |
| 14 | echo "設定 iTerm2 偏好設定資料夾路徑" |
| 15 | # 將 iTerm2 的偏好設定指向自訂的資料夾 |
| 16 | defaults write com.googlecode.iterm2 PrefsCustomFolder "$HOME/.iterm2" |
| 17 | fi |
| 18 | |
| 19 | fi |
| 20 |
timmy / Mac 自動設置 iTerm2 路徑
Last active 1 week ago
自動檢測 macOS 並設置 iTerm2 偏好設定資料夾為自訂路徑。
Revision e4445eaff7f61b8c8cc86a9f2d3045899a60300f
Comments 0
Log in to leave a comment