记录一下自己常用的 Mac 操作配置。
1. 前置安装
1.1 系统设置
设置 -> 桌面与程序坞 -> Dock 右侧
密码修改为 1 位数
1
   | pwpolicy -clearaccountpolicies
   | 
然后去系统偏好设置 ->用户与群组 ->修改密码
1.2 软件前置
- Dropbox
 - 1Password
 - 百度输入法
 - Chrome
 - Obsidian
 
1.3 终端前置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
   |  https://github.com/alacritty/alacritty
 
  defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
 
  /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" 
 
  brew install trash  brew install rg brew install rclone brew install eza brew install watch brew install autossh
  brew install fastfetch
 
  | 
2. 终端安装和配置
2.1 设置 SSH
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
   |  https://github.com/unix2dos/LevonConfig/tree/main/Config
 
 
 
  sudo chmod 755 ~/.ssh sudo chmod 600 ~/.ssh/* sudo chown $USER ~/.ssh/*
 
  cd workspace git clone git@github.com:unix2dos/LevonConfig.git
 
  rm -rf ~/.ssh ln -s ~/workspace/LevonConfig/Config/ssh  ~/.ssh
 
 
  sudo chmod 755 ~/.ssh sudo chmod 600 ~/.ssh/* sudo chown $USER ~/.ssh/*
 
  | 
2.2 Tmux
1 2 3 4 5 6 7 8 9 10 11
   |  brew install tmux
 
  cd ~ git clone https://github.com/gpakosz/.tmux.git ln -s -f .tmux/.tmux.conf
 
  rm -rf ~/.tmux.conf.local && ln -s ~/workspace/LevonConfig/Config/tmux/.tmux.conf.local ~/.tmux.conf.local tmux source-file ~/.tmux.conf
 
  | 
2.3 zsh+plugin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
   |  sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
 
  git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
 
  git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  git clone https://github.com/wfxr/forgit.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/forgit
  git clone https://github.com/so-fancy/diff-so-fancy.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/diff-so-fancy
 
  https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k 
 
  rm -rf ~/.zshrc && ln -s ~/workspace/LevonConfig/Config/zsh/.zshrc ~/.zshrc
 
  | 
2.4 Vim
1 2 3 4 5 6
   | curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  ln -s ~/workspace/LevonConfig/Config/vim/.vimrc ~/.vimrc    
  vi     :PlugInstall    
   | 
2.5 Fzf 模糊搜索
1 2 3 4 5 6 7
   |  git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install source ~/.zshrc
 
  git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
 
  | 
2.6 配置软链
1 2 3 4 5 6 7 8 9 10 11 12
   |  ln -s ~/workspace/LevonConfig/Config/alacritty/alacritty.toml ~/.alacritty.toml
 
 
 
 
  mkdir -p ~/.config/git/ ln -s ~/workspace/LevonConfig/Config/git/ignore ~/.config/git/ignore ln -s ~/workspace/LevonConfig/Config/git/.gitconfig ~/.gitconfig ln -s ~/workspace/LevonConfig/Config/git/.gitconfig-work ~/.gitconfig-work ln -s ~/workspace/LevonConfig/Config/git/czrc ~/.config/.czrc
 
  | 
3. 项目
3.1 Blogs
1 2 3 4
   |  cd ~ && mkdir workspace && cd workspace git clone git@github.com:unix2dos/blog-readwrite.git git clone git@github.com:unix2dos/blog-liuvv.git
 
  | 
3.2 Obsidian
1 2 3 4 5 6 7 8 9 10 11 12
   |  ln -s ~/Dropbox/_Obsidian_ ~/workspace/Obsidian  
 
  cd ~/workspace git clone git@github.com:unix2dos/Obsidian.git --depth=1 a.git
 
  mv a.git/.git /Users/liuwei/workspace/.gitdir_Obsidian rm -rf a.git
 
 
 
  | 
3.3 多重备份
1 2 3 4 5 6 7 8 9 10 11 12 13
   |  ln -s ~/Dropbox/_backups_ ~/workspace/backups
 
 
  cd ~/workspace git clone git@github.com:unix2dos/_backups_.git --depth=1 b.git 
 
  mv b.git/.git /Users/liuwei/workspace/.gitdir_backups rm -rf b.git
 
 
 
  | 
3.4 开发配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
   |  https://go.dev/dl/ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
 
  https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script nvm install stable   nvm ls
 
  https://www.anaconda.com/download conda info -e
 
  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
 
  | 
1 2 3 4 5
   |  npm i -g czg
 
  pip install shell-gpt
 
  | 
4. 常用软件
4.1 应用软件
参考:https://www.liuvv.com/p/2e385ebc.html
4.2 开发软件
- Navicat Premium Lite
 - Another Redis Desktop (支持导出配置)
 - Cursor
 - Postman
 - Orbstack
 
5. Mac 操作
5.1 Mac 设置
- 打开夜览模式
 - 触发角
 - 固定 F1-F12
 - 最小化程序到应用图标
- 系统偏好设置 ->Dock->Mini windows into application icon
 
 - 访达配置
 
5.2 软件设置
- Typora
- 图像 ->插入图片时: 复制到指定路径(./${filename})
 - 图像 -> 所有的选项全选中
 
 - Chrome Tab
 - Cursor