markdown 为Iterm2安装新主题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 为Iterm2安装新主题相关的知识,希望对你有一定的参考价值。
# Demo
\- Defautl:
![Default](https://gist.githubusercontent.com/kevin-smets/9722391f8b3e4fa436b1c1dcf05ecd88/raw/bff605d541d087e34c19d4fb07c721fa6765a70a/agnoster.png)
\- Powerlevel10k
![Powerlevel10k](https://gist.githubusercontent.com/kevin-smets/9722391f8b3e4fa436b1c1dcf05ecd88/raw/bff605d541d087e34c19d4fb07c721fa6765a70a/powerlevel9k.png)
# How to install
## iTerm2
`brew cask install iterm2`
Or, if you do not have homebrew (you should): [Download](http://www.iterm2.com/downloads.html) and install iTerm2
iTerm2 has better color fidelity than the built in Terminal, so your themes will look better.
Get the iTerm color settings
- [Solarized Dark theme](https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Solarized%20Dark%20-%20Patched.itermcolors) (patched version to fix the bright black value)
- [Solarized Light theme](https://raw.githubusercontent.com/altercation/solarized/master/iterm2-colors-solarized/Solarized%20Light.itermcolors)
- [More themes @ iterm2colorschemes](http://iterm2colorschemes.com/)
Just save it somewhere and open the file(s). The color settings will be imported into iTerm2. Apply them in iTerm through iTerm → preferences → profiles → colors → load presets. You can create a different profile other than `Default` if you wish to do so.
## Oh My Zsh
More info here: https://github.com/robbyrussell/oh-my-zsh
### Install with curl
`sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"`
When the installation is done, edit `~/.zshrc` and set `ZSH_THEME="agnoster"`
### Powerlevel9k / Powerlevel10k
Why Powerlevel10k? Well, because it's a drop-in replacement for Powerlevel9k, just a lot faster to render your prompt. `ls` feels fast again!
So if you prefer the Powerlevel10k look with added info such as exit codes and timestamps on the right, run:
`git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k`
Then edit your `~/.zshrc` and set `ZSH_THEME="powerlevel10k/powerlevel10k"`.
Also add the following: `POWERLEVEL9K_MODE="awesome-patched"`
Powerlevel10k offers a whole lot more, best is to [check out these user made configs yourself](https://github.com/bhilburn/powerlevel9k/wiki/Show-Off-Your-Config).
### Install a patched font
- [Source Code Pro](https://github.com/powerline/fonts/blob/master/SourceCodePro/Source%20Code%20Pro%20for%20Powerline.otf)
- [Source Code Pro + Font Awesome](https://github.com/Falkor/dotfiles/blob/master/fonts/SourceCodePro%2BPowerline%2BAwesome%2BRegular.ttf), this one is needed if you want the icons from Font Awesome as shown in the screenshot for Powerlevel10k.
- [Others @ powerline fonts](https://github.com/powerline/fonts)
Open the downloaded font and press "Install Font".
Set this font in iTerm2 (iTerm → Preferences → Profiles → Text → Change Font), best to do this for "Font" and for "Non-ASCII Font".
Restart iTerm2 for all changes to take effect.
以上是关于markdown 为Iterm2安装新主题的主要内容,如果未能解决你的问题,请参考以下文章