oh-my-zsh+Tmux打造Linux最强Terminal

玩Linux那个不用终端的?

其实我压根不用Linux🤣

工具原料:

演示操作系统:

  • Fedora 29

step 1

  • 安装zshtmuxneofetchoh-my-zsh
    1
    sudo dnf install -y zsh tmux neofetch git curl vim
    1
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • 安装powerlevel9k
    1
    git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

step 2

  • 更改oh-my-zsh主题

    1
    vim ~/.zshrc

    找到ZSH_THEME="robbyrussell"改为ZSH_THEME="powerlevel9k/powerlevel9k",之后保存,执行source ~/.zshrc

  • 安装awesome-terminal-fonts字体

    1
    2
    3
    4
    5
    git clone https://github.com/gabrielelana/awesome-terminal-fonts.git
    cd awesome-terminal-fonts
    ./install.sh
    echo 'source ~/.fonts/*.sh' >> ~/.zshrc
    cp ./config/10-symbols.conf ~/.config/fontconfig/conf.d

oh-my-zsh的配置文件中添加POWERLEVEL9K_MODE='awesome-fontconfig'source ~/.fonts/*.sh
配置文件看起来像这样:

1
2
3
POWERLEVEL9K_MODE='awesome-fontconfig'
source ~/.fonts/*.sh
ZSH_THEME="powerlevel9k/powerlevel9k"
  • 安装powerline字体,以普通用户身份执行,不然终端程序首选项里面设置不了字体
    1
    sudo dnf install powerline-fonts
    或者通过下面命令安装:
    1
    2
    3
    4
    5
    6
    7
    8
    # clone
    git clone https://github.com/powerline/fonts.git --depth=1
    # install
    cd fonts
    ./install.sh
    # clean-up a bit
    cd ..
    rm -rf fonts

终端程序编辑-首选项里面更改字体,选择有for powerline字眼的字体。

还可以!