昨天忘记备份直接升级了13.0 Beta版(22A5295i)导致各种软件都不能正常使用,所以我需要备份一下。 并且可以记录一下我对我的MacBook Pro的常用软件集齐配置。

起步

作为国内的开发者,第一款软件我认为必定是Clash或者其他的代理软件。

Homebrew

Homebrew它是一个软件包管理器,可以帮助我们安装软件包,并且可以自动更新软件包。

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

常用软件

参考taniarascia

## Shell Programs
brew install \
  git \
  bat \
  exa \
  tldr \
  fzf &&

# GUI programs
brew install --cask \
  visual-studio-code \
  google-chrome \
  iterm2 \
  docker \
  discord \
  postgres \
  bear \

Shell

在MAC上我推荐使用 zsh,因为 zsh 是一个强大的 shell,它支持命令行参数,能够更好的管理系统,更好的使用系统,更好的维护系统。

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

软件方面搭配 ITerm2

主题方面选择P10K

附上截图ITerm2

背景图background-image

字体我选择 MesloLGS NF

其他个性化配置可以参考其他文章

alias

alias nio="ni --prefer-offline"
alias myserve="ssh root@150.158.90.60"
alias d="docker-compose"
alias tnew="tmux new -s"
alias tlog="tmux attach-session -t"
alias nd="nr dev"
alias s="nr start"
alias b="nr build"
alias bw="nr build --watch"
alias r="nr"
alias ga='git add'
alias gs='git status'
alias gcm='git commit -m'
alias gcam='git add -A && git commit -m'
alias gp='git push'
alias gpl='git pull --rebase'
alias gc='git clone'


# 自动生成.gitignore
ignore() {
  if [ -f ".gitignore" ]; then
    echo "gitignore已存在"
    return
  fi
  echo "...正在生成.gitignore"
  touch .gitignore                                                                                                                                # 创建文件
  echo "*.DS_Store  \nnode_modules \n*.log \nidea/ \n*.local \n.DS_Store \ndist \n.cache \n.idea \nlogs \n&-debug.log \n*-error.log" >>.gitignore # 添加内容
}

#设置代理
function proxy_on() {

    export http_proxy="http://127.0.0.1:7890"
    export https_proxy=$http_proxy
    export all_proxy="socks5://127.0.0.1:7890" # or this line
    echo -e "已开启代理"
}

function proxy_off(){
    unset http_proxy
    unset https_proxy
    unset all_proxy
    unset no_proxy
    echo -e "已关闭代理"
}

Plugins

# 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
plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
)

Exports

#GOLANG
export GOROOT=/usr/local/go 
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin
export GOPROXY=https://goproxy.cn,direct
export GOPRIVATE=gitee.com

# HomeBrew
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"

# VOLTA
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"

Node

Node管理工具 我使用的是 Volta

# install Volta
curl https://get.volta.sh | bash

# install Node
volta install node

# start using Node
node

SSH

生成秘钥

ssh-keygen -t ed25519 -C "your_email@example.com"

将其加入到GitHub/SSH上

Host myserve
  HostName 150.158.90.60
  User root

Host github.com
port 443 
HostName ssh.github.com
IdentityFile ~/.ssh/id_rsa

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Soft

以下是个人常用软件 大部分软件可以通过MacWk搜索到

截图 -> iShot 翻译 -> Bob 搜索 -> Alfred UTool 播放器 -> IINA

效率工具

  • Thor 快捷键启动工具
  • 自动切换输入法Lite 不同软件配置不同输入法
  • Keka 压缩工具
  • Karabiner 键盘自定义
  • Fig 终端可视化提示
  • iTerm2 终端
  • Termius SSH+FPT工具
  • Lemon Clean my mac x 替代品
  • Open VPN VPN代理工具
  • Motrix 下载工具
  • MenubarX 摸鱼神器 菜单栏打开网页
  • Hide Bar 隐藏菜单栏 DownLoad
  • GIPHY CAPTURE 视频转GIF
  • iHosts host修改工具
  • Mounty 挂载NFTS工具 DownLoad

浏览器拓展

  • FeHelper 前端工具箱集合
  • Go Home 下班倒计时 (Github 搜索 go-home-vue)
  • Save All Resources 保存所有资源,仿站用
  • Google 翻译 翻译工具