mac下iterm配色、半透明与样式设置
mac下iterm配色、半透明与样式设置
* {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
.MathJax_PHTML .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
-->
mac下iterm配色、半透明与样式设置
主要为了实现命令行颜色高亮与整个命令窗口半透明效果。
1、配色主题包下载
1、http://iterm2colorschemes.com/
下载后解压,到iterm2中,左上角iTerm2->preferences->Profiles,右侧面板找到Colors选项,右下角展开Color Presets…,拉到最下面,选择import,把下载解压好的配色主题包下的schemes下的所有.itermcolors文件导入,导入完成后再展开Colors下拉列表,即可选择不同的配色模板。2、只下载solarized配色模板
item2里好像自带这个配色模板,导入后叫Solarized Dark和Solarized Light。
http://ethanschoonover.com/solarized
找到download,下载后解压,按上面同样方式导入iterm2-colors-solarized文件夹下的.itermcolors文件。
一般用Solarized Dark即可。
2、修改配置文件
sudo vim /etc/profile
- 1
这时候如果有权限问题,sudo chmod 644 /etc/profile
在文件中追加:
find_git_branch () {
local dir=. head
until [ "$dir" -ef / ]; do
if [ -f "$dir/.git/HEAD" ]; then
head=$(< "$dir/.git/HEAD")
if [[ $head = ref:\ refs/heads/* ]]; then
git_branch=" (${head#*/*/})"
elif [[ $head != '' ]]; then
git_branch=" → (detached)"
else
git_branch=" → (unknow)"
fi
return
fi
dir="../$dir"
done
git_branch=''
}
PROMPT_COMMAND="find_git_branch; $PROMPT_COMMAND"
black=$'\[\e[1;30m\]'
red=$'\[\e[1;31m\]'
green=$'\[\e[1;32m\]'
yellow=$'\[\e[1;33m\]'
blue=$'\[\e[1;34m\]'
magenta=$'\[\e[1;35m\]'
cyan=$'\[\e[1;36m\]'
white=$'\[\e[1;37m\]'
normal=$'\[\e[m\]'
PS1="$white[$white@$green\h$white:$cyan\W$yellow\$git_branch$white]\$ $normal"
配置立刻生效:
source /etc/profile
这时候颜色应该已经显示了。
3、透明度
透明度,iterm2中,左上角iTerm2->preferences->Profiles,右侧找到window选项卡,拖动Transparency调整.
4、安装oh-my-zsh
- 安装oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
修改zsh配置文件
vi ~/.zshrc
ZSH_THEME=”robbyrussell”修改为ZSH_THEME=”agnoster”
重启items
- 安装字体
# clone 先克隆
git clone https://github.com/powerline/fonts.git
# install 后安装
cd fonts
./install.sh
iterm2中,左上角iTerm2->preferences->Profiles,右侧text选项卡Font和Non-ASCII Font都设置为
Meslo LG S DZ Regular for Powerline字体。
重启items
5、语法高亮插件
$ cd到.zshrc所在目录
$ git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
$ 打开 ~/.zshrc
# 添加下面的语句到.zshrc文件末尾
source XXX/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# 注意:xxx代表zsh-syntax-highlighting所在目录
# 再次打开.zshrc文件,在最后面添加下面内容
plugins=(zsh-syntax-highlighting)
# 启用命令纠错功能
ENABLE_CORRECTION="true"
6、其他设置
设置菜单栏出现位置与主题:iTerm2->preferences->Profiles->Appearance
设置iterm出现位置:iTerm2->preferences->Profiles->window
设置显现和隐藏热键(option+空格):iTerm2->preferences->Profiles->window
设置之后,通过option+空格就能切换iterm2的显示与隐藏。
最终效果:
iTerm2 配色方案(oh-my-zsh& Powerline)
mac下iterm配色、半透明与样式设置的更多相关文章
- Mac 下用 go 开发Android应用环境设置
需要的工具 设置代理 请参考:http://www.cnblogs.com/ghj1976/p/5087049.html Mac 下命令行设置代理: export http_proxy=http:// ...
- 转载-Mac下iterm无法使用rz并提示waiting to receive.**B0100000023be50
原文链接:https://www.kissfree.cn/2530.html 安装rz sz 1 2 brew install lrzsz 运行rz会报类似错:rz会出现?z waiting ...
- mac下 Eclipse代码自动补齐 设置
Eclipse -> Perferences -> Java -> Editor -> Content Assist如下图. 将auto activation triggers ...
- 给Mac下的iTerm2增加配色
iterm2就不说了,Mac下非常好用的终端,这里就先谈谈如何给其增加配色,效果如下图 可以来这下载theme : http://iterm2colorschemes.com/ 1.先编辑你的prof ...
- Mac下设置Android源代码编译环境
在Mac下编译Android最麻烦的就是设置Android的编译环境了,做完这一步基本上剩下的就是近乎傻瓜式的操作了.说起来也简单就三步,设置大小写敏感的文件系统.安装编译工具.设置文件系统同时能打开 ...
- mac 下 apache设置
windows下面的apache配置 apache是mac下是默认就有的,我们只需使用命令开启.暂停和重启就好了 sudo apachectl start sudo apachectl stop su ...
- mac下mysql5.6字符集设置
http://geeksblog.cc/2016/05/28/mac-mysql-unicode/ mac下mysql5.6字符集设置: 在mac下设置mysql5.6字符集时踩过的坑,百分百保证 ...
- Mac下的Chrome或Safari访问跨域设置,MBP上使用模拟器Simulator.app或iphone+Safari调试网页
Mac下的Chrome或Safari访问跨域设置: mac下终端启动Chrome $ open -a Google\ Chrome --args --disable-web-security 或 /A ...
- mac下java的安装和升级以及相关环境设置
安装:brew cask install java8 如果存在多个java,可以设置JAVA_HOME指定java版本 打开终端,执行/usr/libexec/java_home -V 查看MAC下J ...
随机推荐
- Image Processing and Analysis_15_Image Registration:A survey of medical image registration——1998
此主要讨论图像处理与分析.虽然计算机视觉部分的有些内容比如特 征提取等也可以归结到图像分析中来,但鉴于它们与计算机视觉的紧密联系,以 及它们的出处,没有把它们纳入到图像处理与分析中来.同样,这里面也有 ...
- 微软Surface低端版本将问世
平板电脑现如今已走进千家万户,其触屏的操作相比笔记本电脑更加方便,屏幕也比手机大很多,是家用玩机的首选.虽然微软也在这一领域有所发力,推出了Surface这一产品,但其高昂的售价使得其在市场上的表现并 ...
- 警告信息-Comparing unrelated types
解决方案 使用equals 来比较不相关的类和接口
- contos 6.6下安装lamp
安装篇 第一步:配置防火墙(默认情况下,端口80和3306是拒绝访问的,在防火墙上进行配置): vi /etc/sysconfig/iptables(在"COMMIT"的上一行加上 ...
- python3 基础二——基本的数据类型三
一.字符串str 1.创建字符串,为变量分配一个值 word='字符串' sentence="字符串\n" #python中单引号和双引号使用完全相同 paragraph=&quo ...
- mysql数据库高并发处理
总体思想:短, 少, 分流 短: 1.页面静态化, 2.使用缓存 3.使用存储过程, 对于处理一次请求需要多次访问数据库的操作, 将操作整合到存储过程, 这样只需要一次数据库访问 4.延迟修改, 将修 ...
- 特殊方法 之 len __repr__ __str__
关于len, 如果x是一个内置类型的实例,那么len(x)的速度回非常快,背后的原因是CPython会直接从一个C结构体里读取对象的长度,完全不用调用任何方法,获取一个集合中的元素的数量是一个很常见的 ...
- animation-timing-function
animation-timing-function 语法: animation-timing-function:<single-animation-timing-function>[,&l ...
- Vue Parent Send Ajax Data to Child Component
Vue 父组件ajax异步更新数据,子组件props获取不到 2018年06月26日 09:25:06 哎哟嘿 阅读数 3585 当父组件 axjos 获取数据,子组件使用 props 接 ...
- 为什么说Redis是单线程的?
一.前言 近乎所有与Java相关的面试都会问到缓存的问题,基础一点的会问到什么是“二八定律”.什么是“热数据和冷数据” ,复杂一点的会问到缓存雪崩.缓存穿透.缓存预热.缓存更新.缓存降级等问题,这些看 ...