mlyixi's Blog

欲望的唤醒,信仰的坚定
xcode子工程及cocoapods管理
vimified使用

mac, kde4切换到zsh,打造有git提示的美化shell

mlyixi posted @ 2012年12月12日 05:59 in 未分类 with tags mac zsh agnoster , 5629 阅读

MAC:

安装 homebrew:

然后 brew install zsh, vim , macvim etc...

修改/etc/paths:

将/usr/local/bin 设为第一行。系统将优行查找/usr/local/bin 中的程序

修改/etc/shells:

添加/usr/local/bin/zsh,注册 shell.

 

下载ohmyzsh:

 

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

 

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

 

chsh -s /usr/local/bin/zsh

 

当然也可以把它放到云端,复制出.zshrc,建立oh-my-zsh的软链接

 

ln -s /path/to/cloud/oh-my-zsh/ ~/.oh-my-zsh

 

下载iTerm2,这时已经切换到zsh.

使用agnoster主题

打开.zshrc,设置:

 

SH_THEME="agnoster"

 

DEFAULT_USER="your user name"

设置配色方案:

下载之,然后打开iTerm的首选项,打开profiles中的Colors,load Presets,import "Solarized Dark.itermcolors"

然后在load Presets中选中Solarized Dark。

打字体 补丁:

打开font book

添加系统的字体

这样,该主题就设置好了,可以重启iTerm看看效果啦。PS: 新版的 iTerm2要配合新版的 theme 文件,而 oh-my-zh 的 theme 文件是旧版(172行),需要更新成115行的 theme 文件才可以正常显示如下特殊字符。

之后你可以将你原先在bashrc上的设置全部放到zshrc上。

 

KDE4:

安装zsh后切换到zsh

启用配色方案,在最新的kconsole下已经有solarized配色方案了。不知道是不是oh-my-zsh的原因。所以在settings--manag profiles--edit profile--appearance下修改就好。

安装字体。

 

Avatar_small
Things to do 说:
2022年5月18日 23:20

The travel addict inside you is craving for new adventure? Things to do post will suggest you the new destination for your next journey with all the best spots around the world.

Avatar_small
charlly 说:
2022年12月27日 20:53

KDE4 is a great desktop environment, but it can be a bit resource-heavy. If you're looking for a more lightweight option, consider switching to ZSH. ZSH is a Linux shell that is known for being very customizable. One of the best things about ZSH is that you can create a "beautified" shell with Git prompts. This can help you keep track of your CBD Hemp Oil repositories and make your shell look more aesthetically pleasing.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter