Build a Beautiful oh-my-zsh Themes
Selection Criteria
double line;
provide username, hostname, current directory;
provide information of git branch and commit status;
provide command exit code;
prompt is easy to distinguished from command results;
optional: provide command order number, current time;
Customize zsh prompt
Some important escape sequences in zsh prompt:
%n: username;
%m: hostname;
%~: current directory;
%t: current time;
%?: return code of last command;
Customization of font and color see the following demonstration.
Ref:
"3.9 Customizing the prompt" on zsh on archlinux
Put it together
Create a new file: ~/.oh-my-zsh/themes/lichao.zsh-theme:
rc=$reset_color
cy=$fg_bold[cyan]
bl=$fg_bold[blue]
re=$fg_bold[red]
wh=$fg_bold[white]
ye=$fg_bold[yellow]
gr=$fg_bold[green]
ma=$fg_bold[magenta]ZSH_THEME_GIT_PROMPT_PREFIX="git("
ZSH_THEME_GIT_PROMPT_SUFFIX="):"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="✗"
ZSH_THEME_GIT_PROMPT_ADDED="added"
ZSH_THEME_GIT_PROMPT_MODIFIED="modified"
ZSH_THEME_GIT_PROMPT_DELETED="deleted"
ZSH_THEME_GIT_PROMPT_RENAMED="renamed"
ZSH_THEME_GIT_PROMPT_UNMERGED="unmerged"
ZSH_THEME_GIT_PROMPT_UNTRACKED="untracked"PROMPT='$ye%n$rc @ $cy%m $gr%~ $re$(git_prompt_info)$(git_prompt_status)$rc $wh%t$rc
${wh}[%?]${rc} 'Modify "ZSH_THEME" in ~/.zshrc as:
ZSH_THEME="lichao"
Recommended Themes
kphoen: double line, display user, host, CWD, command exit code when it's nonzero, git branch and status, no time, its title line is darker than "ys", but the command and command output is the same;
ys: double line, display user, host, CWD, time, partial git information, no exit code;
bureau: double line, display user, host, CWD, time, complete git information, no exit code;
steeef: double line, display user, host, CWD, complete git information, no exit code;
rkj: double line, display user, host, CWD, time, command exit code, no git information;
duellj: double line, display user, host, CWD, command order number, time, no git information;
some other good themes includes: frisk, candy, blinks
Build a Beautiful oh-my-zsh Themes的更多相关文章
- [poj1113][Wall] (水平序+graham算法 求凸包)
Description Once upon a time there was a greedy King who ordered his chief Architect to build a wall ...
- 7 Must Read Python Books
7 Must Read Python Books I started learning Python just two years ago. Coming from a C++ and Java ba ...
- POJ 1113:Wall
原文链接:https://www.dreamwings.cn/poj1113/2832.html Wall Time Limit: 1000MS Memory Limit: 10000K Tota ...
- hdu 1348 Wall (凸包)
Wall Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...
- 彩色的Shell
我常在命令行下工作,以前老被同事说"你整天在那个黑窗口上倒腾什么?" 现在这个问题变成了"你这个花花绿绿的窗口是什么东西?" 其实都是同一个东西:一个兼容于xterm的终端窗口,要么是PuTTY/Ki ...
- 计算几何--求凸包模板--Graham算法--poj 1113
Wall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 28157 Accepted: 9401 Description ...
- poj 1113:Wall(计算几何,求凸包周长)
Wall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 28462 Accepted: 9498 Description ...
- 【POJ】1113 Wall(凸包)
http://poj.org/problem?id=1113 答案是凸包周长+半径为l的圆的周长... 证明?这是个坑.. #include <cstdio> #include <c ...
- Wall(凸包POJ 1113)
Wall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 32360 Accepted: 10969 Description On ...
随机推荐
- POJ 3761:Bubble Sort——组合数学
题目大意:众所周知冒泡排序算法多数情况下不能只扫描一遍就结束排序,而是要扫描好几遍.现在你的任务是求1~N的排列中,需要扫描K遍才能排好序的数列的个数模20100713.注意,不同于真正的冒泡排序算法 ...
- Linux Netfilter框架分析
目录 Netfilter框架 Netfilter的5个hook点 netfilter协议栈数据流分析 连接跟踪conntrack conntrack连接跟踪表条目 连接跟踪表大小 管理连接跟踪表 ip ...
- ssh服务两句话
ssh服务采用"非对称密钥系统":主要通过两把不一样的公钥和密钥来进行加密与解密的过程 公钥(Public Key):提供给远程主机进行数据加密 私钥(Private Key):远 ...
- File类与常用IO流第八章——缓冲流
第八章.缓冲流 缓冲流概述 缓冲流,也叫高效流,是对4个基本的FileXxx流的增强.按照数据类型分为4类: 输入缓冲流 输出缓冲流 字节缓冲流 BufferedInputStream Buffe ...
- 初探SpringRetry机制
重试是在网络通讯中非常重要的概念,尤其是在微服务体系内重试显得格外重要.常见的场景是当遇到网络抖动造成的请求失败时,可以按照业务的补偿需求来制定重试策略.Spring框架提供了SpringRetry能 ...
- Hive——环境搭建
Hive--环境搭建 相关hadoop和mysql环境已经搭建好.我博客中也有相关搭建的博客. 一.下载Hive并解压到指定目录(本次使用版本hive-1.1.0-cdh5.7.0,下载地址:http ...
- Junit测试用例配置Log4j
用Junit测试非常方便,但有时我们想要看日志来方便排除,使用spring+log4j时,用Junit测试看日志很多人都不太会,即如何将Junit与log4j进行整合. 我也是研究了半天,才终于找到了 ...
- 分别在Update和FixedUpdate使用GetKeyDown
测试目的 探究分别在Update和FixedUpdate使用GetKeyDown执行次数,会不同的 测试开始 在Update测试 我们先在Update测试,很正常是一帧重置一下状态,以防止点击一下执行 ...
- IDEA搭建springmvc环境之后无故出现404
其实这应该是IDEA的自身问题 打开项目结构
- Solon 1.5.16 发布,多项细节优化
Solon 是一个轻量的Java基础开发框架.强调,克制 + 简洁 + 开放的原则:力求,更小.更快.更自由的体验.支持:RPC.REST API.MVC.Job.Micro service.WebS ...