Steps to reinstall a workbox for myself
Edit me

Mac Reinstallation Steps

=====

Backup List

  • SSH Config
  • Karabiner Complex Modifications

Create Installation Media

sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Mandantory

Install Xcode Command Line Tools

Xcode Command Line Tools
Xcode vs MacOS Compatibility

Install Brew

git config --global http.version HTTP/1.1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Homebrew

Install zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

on-my-zsh github repo

Install tmux

brew install tmux

Env Config

Git clone from Github to ~/Documents

Git Config

git config --global user.name "Matrix Zou"
git config --global user.email matrix.zj@gmail.com

show path in Finder title bar

defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; killall Finder

Set New Hostname

hostname=""
sudo scutil --set HostName "${hostname}"
sudo scutil --set LocalHostName "${hostname}"
sudo scutil --set ComputerName "${hostname}"
dscacheutil -flushcache

reboot to take it in effect

Install gnu-sed/gawk

brew install gnu-sed
brew install gawk

PATH config

$ brew list gnu-sed | grep 'bin/sed'
/usr/local/Cellar/gnu-sed/4.8/libexec/gnubin/sed

$ brew list gawk | grep 'bin/awk'
/usr/local/Cellar/gawk/5.3.0/libexec/gnubin/awk
sed_path=$(brew list gnu-sed | grep 'bin/sed')
awk_path=$(brew list gawk | grep '/bin/awk')
echo "export PATH=\"${awk_path%/awk}:${sed_path%/sed}:$PATH\"" >> ~/.zshrc

Application Install list

Optional

Applicaiton Setup

iTerm2

  • Access System Clipboard (General - Selection - Check Applications in terminal may access clipboard)
  • Window Transparency (Profile - Window - Transparency 30, check Keep background colors opaque)
  • Disable Bell (Profile - Terminal - Check Silence bell)
  • Mac Option key for Alt in Bash (Profile - Keys - Left/Right Option key Esc+)
  • Disable Color Schema Change between Mac light mode and dark mode (Profile - Colors - uncheck Use different colors for light mode and dark mode)

Karabiner Complex Modifications

complex modifications config location

/Users/jzou/.config/karabiner/assets/complex_modifications

Squirrel 鼠须管

Installation

Squirrel

brew install --cask squirrel

Launch System Prereferences, Keyboard, tab Input Sources, Add Squirrel.
Install Wubi jidian Input

cd ~/Downloads
git clone https://github.com/KyleBing/rime-wubi86-jidian.git
cp -aRv rime-wubi86-jidian/* ~/Library/Rime

Enable Chinese Input in iterm2

  • Find out iTerm2 Bundle Identifier: com.googlecode.iterm2
$ cat /Applications/iTerm.app/Contents/Info.plist | grep -i identifier -A 1
    <key>CFBundleIdentifier</key>
    <string>com.googlecode.iterm2</string>

$ osascript -e 'id of app "iTerm2"'
com.googlecode.iterm2
  • Update RIME config
    add folloing block to ~/Library/Rime/squirrel.custom.yaml
patch:  
  app_options/com.apple.Xcode:   
    ascii_mode: true    
  app_options/com.googlecode.iterm2: {}    

Add custom phase

echo "胖胖\teueu" >> wubi86_jidian.dict.yaml

English / Chinese Mix input

  • Update Default Squirrel config inline_ascii 在输入法的临时英文编辑区内输入字母,数字,符号,空格等,回车上屏后自动复位到中文
    disable enter clear all inputs
    $ diff ~/Library/Rime/default.custom.yaml{,.bak}
    39c39
    <     good_old_caps_lock: false       # true: 在保持 cap 键原有的特征, false: 点击不会切换大小写
    ---
    >     good_old_caps_lock: true       # true: 在保持 cap 键原有的特征, false: 点击不会切换大小写
    42,43c42,43
    <       Shift_L: inline_ascii          # macOs 上 shift 键不区别左右,设置参数同上
    <       Shift_R: inline_ascii
    ---
    >       Shift_L: commit_code          # macOs 上 shift 键不区别左右,设置参数同上
    >       Shift_R: commit_code
    64c64
    < #      - { when: composing, accept: Return, send: Escape }
    ---
    >       - { when: composing, accept: Return, send: Escape }
    
  • Update config for Wubi
    $ diff wubi86_jidian.schema.yaml{,.bak}
    56c56
    <   max_code_length: 20                    # 四码上屏
    ---
    >   max_code_length: 4                    # 四码上屏
    

Optional

Trust Cert

  • Import CA Cert and private Cert
  • Open Keychain Access application and locate the Machine Certificate issued to Mac OS X Client in the System keychain.
    Right-click on the private key associated with Certificate and click Get Info, then go to the Access Control tab
  • Click + to select an Application to allow
  • Press key combination <Command> + <Shift> + G to open Go to Folder in Finder Application. Enter /Applications/GlobalProtect.app/Contents/Resources and click Go
  • Find PanGPS and click it, and then press Add
  • Save Changes to private key

Virt-Manager on Mac

virt-manager on Mac github repo

brew tap jeffreywildman/homebrew-virt-manager
brew install virt-manager virt-viewer

iStart Menus Activation Key

Email: 982092332@qq.com
SN: GAWAE-FCWQ3-P8NYB-C7GF7-NEDRT-Q5DTB-MFZG6-6NEQC-CRMUD-8MZ2K-66SRB-SU8EW-EDLZ9-TGH3S-8SGA
Tags: misc