MAC小工具,教你打造一款逆天的终端
1、安装Iterm2 https://www.iterm2.com/
2、安装主题,下载seti_ui https://github.com/willmanduffy/seti-iterm
3、将下载的主题导入到你的iterm配置中
打开iterm2->preferences->profiles->colors->colors presets->import选中刚才的⽂文件
4、让命令行变色
用vim打开文件 ~/.bash_profile
输入i 进入编辑模式
把下面内容粘贴到文件最后
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PS1='\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
按esc,接着输入:wq!,保存并退出
5、找一个你喜欢的字符画,命名成你喜欢的名字,放到你喜欢的位置,例如:
hello.txt
,%%%%%%%%,
,%%/\%%%%/\%%
,%%%\c "" J/%%%
%. %%%%/ o o \%%%
`%%. %%%% _ |%%%
`%% `%%%%(__Y__)%%'
// ;%%%%`\-/%%%'
(( / `%%%%%%%'
\\ .' |
\\ / \ | |
\\/ ) | |
\ /_ | |__
(___________)))))))
6、安装lolcat,让字符变漂亮,其实这个没啥用,只是看起来比较酷
sudo gem install lolcat vi ~/.bash_profile
这一步可能会出问题,因为之前我替换了本地ruby的镜像源,所以一直安装不成功,你可以执行以下命令查看你本地的镜像源
gem source –l
然后执行gem sources --remove http://ruby.taobao.org/来删除你现有的镜像源,
接着执行gem sources -a https://gems.ruby-china.com/ 来添加一个目前国内可用的镜像源,最后执行gem source –l看是否替换成功。
7、执行lolcat ~/downloads/hello.txt,就可以看到下图酷炫的效果了
8、如果感兴趣的话,还可以修改iterm2的字体,操作可以参考 https://github.com/powerline/fonts ,然后修改
iterm2->preferences->profiles->text