手把手带你美化Mac的iTerm2终端on-my-zsh

第一步:下载iterm2

iterm2官网下载安装就好了。

当然最推荐还是brew!!!

brew cask install iterm2

第二步:下载仓库

本文的github仓库地址为: 项目链接

  • 本仓库包含字体,字库,主题仓库,高亮显示等全部资源
  • 直接下载可运行如下指令。
git clone https://github.com/sexjun/on-my-zsh-beautification.git

第三部:配置

3.0 安装Oh My Zsh

  sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

3.1 配置字体

  • 执行如下指令安装字体
    cd fonts
    ./install.sh
    # clean-up a bit
    cd ..
    
  • 更换字体
    然后打开 iTerm2,按Command + ,键,打开 Preferences 配置界面,然后Profiles -> Text -> Font -> Chanage Font,选择 Meslo LG M Regular for Powerline 字体。
    在这里插入图片描述

3.2 配置主题

在下载的代码里有一个iTerm2-Color-Schemes的文件夹
在这里插入图片描述
这个文件的内部:schemes子文件里面有很多主题,可以自行选择。
在这里插入图片描述

  • setting path
    在这里插入图片描述
  • schemes path
    在这里插入图片描述
  • seeting color scheme
    after you import the scheme you like, it will shows in hereafter you import the scheme you like, it will shows in here

3.3 配置高亮度

执行如下指令

echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

3.4 配置提醒

待更新

到这里结束,后面是笔记可忽略。

on-my-ssh

介绍

shell的类型有很多种,linux下默认的是bash,虽然bash的功能已经很强大,但对于以懒惰为美德的程序员来说,bash的提示功能不够强大,界面也不够炫,并非理想工具。

而zsh的功能极其强大,只是配置过于复杂,起初只有极客才在用。后来,有个穷极无聊的程序员可能是实在看不下去广大猿友一直只能使用单调的bash, 于是他创建了一个名为oh-my-zsh的开源项目…

在这里插入图片描述

安装

查看系统当前使用的shell

$ echo $SHELL 
/bin/bash

查看shell列表

$ cat /etc/shells
在这里插入图片描述

三种安装方式任意选一种。

  • curl sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • wget sh -c "$(wget -O- 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)"

安装成功的界面。
在这里插入图片描述

主题美化

  • you can just donwload like by using
  • git clone git@github.com:mbadolato/iTerm2-Color-Schemes.git
    在这里插入图片描述

after you download ,you can see the color schemes in the file readme
在这里插入图片描述

Use it as follows。

  • setting path
    在这里插入图片描述
  • schemes path
    在这里插入图片描述
  • seeting color scheme
    after you import the scheme you like, it will shows in hereafter you import the scheme you like, it will shows in here

字体安装

github 链接

下载后执行
在这里插入图片描述

更换字体:

然后打开 iTerm2,按Command + ,键,打开 Preferences 配置界面,然后Profiles -> Text -> Font -> Chanage Font,选择 Meslo LG M Regular for Powerline 字体。
在这里插入图片描述

参考博客:https://www.jianshu.com/p/b8a80dd59414

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

早睡的叶子

你的鼓励就是我的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值