iterm2
iTerm2 是默认终端的替代品,也是目前 macOS 下最好用的终端工具,集颜值和效率于一身。
使用
-
iterm2安装 官方地址 https://iterm2.com/downloads.html
-
下载解压 然后移动到Applications
常用的配置
- 设置热键 热键针对单个profile 不同的profile可以设置不同的热键
- 设置 Status bar
- configure status bar
- 配色
- 光标选择
- 窗口设置 从左到右 从上到下 分别是 透明度 背景图 以及模糊度
- 导入导出配置
导出单个或者所有配置
导入配置
配置就到这里 接下来进入高级玩法
- 使用oh my zsh
oh my zsh 简要说明 如下
🙃 A delightful community-driven (with 2,000+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
🙃 一个令人愉快的社区驱动(有 2000 名贡献者)框架,用于管理您的 zsh 配置。 包括 300 个可选插件(rails、git、macOS、hub、docker、homebrew、node、php、python 等),140 个主题为您的早晨增添趣味,以及一个自动更新工具,以便轻松跟上 来自社区的最新更新。
主页地址:https://github.com/ohmyzsh/ohmyzsh
进入到安装环节
- 有三种安装方式支持wget curl fetch
- wget
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- fetch
sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
安装过程很简单
接下来给oh my zsh安装个炫酷的主题
主题的主页地址 :https://github.com/romkatv/powerlevel10k
简介如下
Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.
Powerlevel10k 是 Zsh 的一个主题。 它强调速度、灵活性和开箱即用的体验。
安装过程分为两步
- Clone the repository:
# github地址
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# gitee 地址 网速不佳的可以使用这个
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
- Set ZSH_THEME=“powerlevel10k/powerlevel10k” in ~/.zshrc.
#更新配置
vim ~/.zshrc
#更新主题
ZSH_THEME="powerlevel10k/powerlevel10k"
#生效配置
source ~./.zshrc
安装完成进行配置
- 激活配置
source ~/.zshrc
- 交互式设置 回车后即出现交互式配置
p10k configure
首次配置输入 y 开始配置
接下来进入具体的配置 输入字母或者数字进行选择 配置完成即OK
最后的效果如下
有个透明度设置 可配置
最后推荐两个zsh插件
官方网站:https://github.com/zsh-users 包含很多的插件
- 高亮插件
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/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
效果图如下
配置
# 编译 oh my zsh 配置文件
vim ~/.zshrc
#激活 插件
plugins=( git zsh-syntax-highlighting zsh-autosuggestions)
#保存
:wq
#生效 oh my zsh配置
source ~/.zshrc
插件还有很多 可以去网站上自行探索下
官网地址: https://github.com/zsh-users?q=&type=all&language=shell&sort=stargazers
还有其他的更好的操作可去官网
iterm2 的官方文档 :https://iterm2.com/documentation.html
oh my zsh 官方地址:https://github.com/ohmyzsh/ohmyzsh
oh my zsh 主题的官方地址:https://github.com/romkatv/powerlevel10k
good day !!!