Contents

Mac software

Mac software

记录 Mac 常用和必备的 Apps。

Apps

Terminal (Reference)

软件作用
Homebrew包管理器,轻松安装、更新和管理开源软件包。
iTerm2功能强大的终端模拟器。
Oh My ZshZsh的框架和扩展工具,简化配置,提供主题和插件。
Powerlevel10K基于Zsh的高度可定制命令行提示符主题。

Set proxy

~/.zshrc 加入以下代码:

# proxy 必须开启全局代理 https://github.com/Qingquan-Li/blog/issues/131
proxy () {
  export http_proxy=http://127.0.0.1:8024
  export https_proxy=http://127.0.0.1:8024
  # 如果代理需要身份验证,请添加以下行:
  # export HTTP_PROXY_USER=username
  # export HTTP_PROXY_PASS=password
  # 如果你使用 SOCKS 代理,请添加以下行:
  # export ALL_PROXY=socks5://your_proxy_address:port
  echo "HTTP Proxy on, pls run 'curl cip.cc / ip.gs / ifconfig.co/json' to verify."
}

# noproxy
noproxy () {
  unset http_proxy
  unset https_proxy
#  unset all_proxy
  echo "HTTP Proxy off"
}

1. 安装 Homebrew

可简化 macOS 上软件安装的包管理器

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

2. 安装 iTerm2

一个强大的终端模拟器

brew install --cask iterm2

临时代理

export http_proxy="http://127.0.0.1:8024" export https_proxy=$http_proxy

安装 RAR解压工具

brew install unar
# decompression
unar my_archive.rar

3. 安装 Zsh

增强终端

brew install zsh

设置 Shell

#查看当前使用的Shell
echo $Shell

#修改默认Shell为zsh
chsh -s /bin/zsh

4. 安装 Oh My Zsh

为 zsh 提供额外功能和定制选项的框架

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

4.1. 设置 Oh My Zsh 插件

5. 使用 Powerlevel10K 自定义 Oh My Zsh

一个自定义 Zsh 主题,提升终端体验。

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

p10k configure

6. 探索 Fzf

增强您的终端搜索功能

brew install fzf

安装有用的键绑定和模糊完成

# 使用:https://github.com/junegunn/fzf?tab=readme-ov-file#key-bindings-for-command-line
$(brew --prefix)/opt/fzf/install