介绍
最近在玩黑苹果,因为系统不太稳定,就总需要重装,而且我不太喜欢用时间机器恢复数据。
于是我就写了一个脚本来进行一些重装以后的操作,比如安装需要的软件,改一些系统配置之类。
如果 App Store 有的应用我会默认使用它来安装,其次再使用 Homebrew 安装软件,比如微信之类的(装在容器里更放心)。
你可以自己修改这个脚本来适应你的情况。
代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
   | #!/bin/sh
  sudo -v
 
  defaults write -g NSColorSimulateHardwareAccent -bool true defaults write -g NSColorSimulateHardwareEnclosureNumber -int 4
 
  defaults write com.apple.dock "tilesize" -int 50 defaults write com.apple.dock "magnification" -int 1 defaults write com.apple.dock "largesize" -int 58 killall Dock
 
  defaults write com.apple.finder "ShowPathbar" -bool true defaults write com.apple.finder "_FXSortFoldersFirst" -bool true defaults write com.apple.finder "_FXSortFoldersFirstOnDesktop" -bool true  killall Finder
 
  defaults write com.apple.AppleMultitouchTrackpad "FirstClickThreshold" -int 0
  defaults write com.apple.AppleMultitouchTrackpad "TrackpadThreeFingerDrag" -bool true 
 
  if ! command -v git > /dev/null 2>&1; then     xcode-select --install fi
 
  if ! command -v brew > /dev/null 2>&1; then     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi
 
  if ! command -v zimfw > /dev/null 2>&1; then     curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh fi
 
  brew install arc google-chrome visual-studio-code webstorm warp steam telegram moonlight postman notion neteasemusic
 
  brew install wget btop exa neovim neofetch python3 zulu
 
  brew install stats monitorcontrol rectangle appcleaner 
 
  brew install hackintool opencore-configurator
 
  brew install gnupg pinentry-mac
 
  brew install node pnpm
 
  pnpm setup source ~/.zshrc
 
  pnpm install -g pm2
 
  echo "alias ls='exa'" >> ~/.zshrc echo "alias ll='exa -lah'" >> ~/.zshrc echo "alias vim='nvim'" >> ~/.zshrc
 
 
 
 
  pm2 startup mkdir -p ~/Library/LaunchAgents sudo pm2 startup launchd -u $USER --hp $HOME
 
 
   | 
 
字体
关于字体包,我是自己下载了一些字体自己打包的。下面是字体列表:
- HarmonyOS Sans
 
- JetBrains Mono
 
- SF Mono Font
 
- SourceHanSerif
 
- SourceHanSans
 
注意,不要使用 Homebrew 安装字体。