昨天忘记备份直接升级了13.0 Beta版(22A5295i)
导致各种软件都不能正常使用,所以我需要备份一下。 并且可以记录一下我对我的MacBook Pro的常用软件集齐配置。
起步
作为国内的开发者,第一款软件我认为必定是Clash
或者其他的代理软件。
Homebrew
Homebrew它是一个软件包管理器,可以帮助我们安装软件包,并且可以自动更新软件包。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
常用软件
## 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
附上截图
背景图
字体我选择 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搜索到
效率工具
Thor
快捷键启动工具自动切换输入法Lite
不同软件配置不同输入法Keka
压缩工具Karabiner
键盘自定义Fig
终端可视化提示iTerm2
终端Termius
SSH+FPT工具Lemon
Clean my mac x 替代品Open VPN
VPN代理工具Motrix
下载工具MenubarX
摸鱼神器 菜单栏打开网页Hide Bar
隐藏菜单栏 DownLoadGIPHY CAPTURE
视频转GIFiHosts
host修改工具Mounty
挂载NFTS工具 DownLoad
浏览器拓展
FeHelper
前端工具箱集合Go Home
下班倒计时 (Github 搜索 go-home-vue)Save All Resources
保存所有资源,仿站用Google 翻译
翻译工具
Comments