Oh-My-Zsh is a delightful, open source, community-driven framework for managing your ZSH configuration. It comes bundled with several helpful functions, helpers, plugins, themes, and a few things that make you shout. I am on Mac OS X 10.10.2 (14C2513). I am using Inconsolata patched font from here. But I also tried to patch the font myself. The result is the following: I am able to see the glyphs but zsh (see the glyph next to the branch name develop for a git repository) and also vim fail to display them on Terminal.app. Am I missing any configuration step.
配置一个漂亮的Terminal( 心情好很多)
效果图
安装iTem2
安装
打开iterm2,检查Report Terminal Type的设定,设为xterm-256color,就可在terminal看到漂亮的颜色
修改iTerm2的color scheme
- 打开iterm2
- 快捷键 CMD+i (⌘+i)
- 点击 Colors
- 选择 Color Presets
- 选择Import
- 找到克隆下来的 .itermcolors 文件中的 scheme(s) ,选择喜欢的配色导入
- 再次点击 Color Presets
- 选中导入的color scheme
安装Nerd Fonts
使用的theme中有很多小图标,需要使用支持这些图标的icon font,这类字体称为powerline font(plus版的支持更多图标的称为:nerd font)
没有安装icon font的界面:
安装
安装方法: https://github.com/ryanoasis/nerd-fonts#option-4-homebrew-fonts
查看刚刚安装的文件
打开iterm2,设置字体
注:如果切换字体,iterm2无法正常运行,可能是同一字型有重复版本问题,解决方法:
安装zsh
设置zsh为默认:
bash切换到zsh
安裝 oh-my-zsh
切换内建主题
执行以下指令生效
安装 powerlevel9k
powerlevel9k不是 oh-my-zsh 內建的 theme,需另外下载
编辑.zshrc
更多配置参考:https://github.com/bhilburn/powerlevel9k#available-prompt-segments How can i delete an app on my mac.
快速配置,可参考
推荐安装的套件
Zsh-autosuggestions:https://github.com/zsh-users/zsh-autosuggestions How to quit a fullscreen app on mac windows 10.
参考链接:
编辑于 03-30
Terminal Experience in Windows vs MacOS
I spend most of the time working on my personal project on
MacOS
and I love it. Best mac cbr app software. The fact that its *nix OS makes it very pleasant to work in the terminal. Customizing the terminal pretty easy compared to the limitation introduced by windows.
Don't get me wrong, I don't hate windows, I like windows, I personally use my PC when I working with something that requires a lot of resources (my pc spec is much better than my mac) such as
kubernetes
, docker
, vargrant
and many other things.
But the experience working on Windows terminal is not very pleasant. I typed 'ls for countless times on Windows terminal (and I still do). I workaround things using
ConEmu
but I still think it is not enough.
Pengwin and Zsh
I uninstalled my ubuntu looking for something new, I'm getting
pengwin
. It is an awesome alternative for WSL. Check this out and here is how the out of the box terminal looked like:The tricky part
So when I set up my terminal with
oh-my-zsh
and powerlevel9k
, here is how it looked like:
What happened is:
- I have set up my zsh (just like when i setup it in mac, we will talk about it in the next section)
- I have all the necessary fonts installed
- The font still looks missing
I came to realized that there is a limitation of fonts that can be used in the terminal.
![Zsh Mac Install Fonts In Terminal.app Zsh Mac Install Fonts In Terminal.app](/uploads/1/3/4/1/134148497/781987734.png)
Setting up the terminal
Install oh-my-zsh
- The detail of the installation is here
Install the needed fonts
I would recommend installing nerd-fonts. Here is the one I am using, but you can use pretty much install whichever you comfortable with.
You may download and double click and install the fonts. Sometimes the fonts are not appearing in the Properties of the terminal. And It is a limitation for us to set up a lot of things in the default terminal. So we would need a terminal wrapper. We will use mintty for WSL called
wsltty
Install wsltty
The easiest is using
chocolatey
choco install wsltty
- Have a look at the official documentation as it might be changing time to time.
- The Start menu folder WSLtty contains the link
configure WSL shortcuts
. This function is initially run when wsltty is installed. If should be rerun after adding or removing WSL distributions, in order to create the respective set of shortcuts in the Start menu.
Install Powerlevel9k
What you need is pretty much only to clone the powerlevel9k repository and copy the theme into
oh-my-zsh
theme folder. The configuration folder was generated when we installed oh-my-zsh
in the previous steps. To do that we can execute this:Configure Powerlevel9k Theme
The theme could be configured in
~/.zshrc
file, you may refer to show your config section in the repository.
I used this tacolizard theme for starting
Configure wsltty
I like to configure my terminal using darcula theme on medium opacity. We should also configure the appropriate fonts for the terminal, in this case we will use the
Sauce Code Pro Regular
.
Terminal settings as follows:
Mac Zsh Color
It now looks like the following:
Switch To Zsh Mac
I think its pretty neat!