theme

我准备全部试用一下, 挑出好中差 – 思路1.0
思路2.0, 看看文档, 挑一个喜欢的:

  • https://github.com/robbyrussell/oh-my-zsh
  • https://github.com/robbyrussell/oh-my-zsh/wiki/themes

查询

		 echo $RANDOM_THEME #这个命令查看当前theme
		 echo $ZSH_THEME #如果不是随机theme, 那么可以用这个查看当前theme

果然

看了官方文档, 发现那些差的theme果然是因为人家默认的是白色背景, 白色背景的terminal, 我也是服了.

我的需求:

  • 深色背景的, 白色背景的theme放到深色肯定就看不清了.
  • 纤细的, 字体要纤细, 不能笨重, 各种样式不要那种模糊的, 加粗的.
  • 清晰的, 别用类似蓝紫色, 坨红色这种颜色在深色背景上. 也不要传统的荧光绿.
  • 颜色顺眼的, 别弄那种一坨坨的色块.

需要试用

  • af-magic ok
  • alanpeabody 紫色
  • amuse soso
  • avit 紫色
  • candy purple
  • cloud ok
  • crunch ok
  • dallas soso
  • dieter purple
  • dogenpunk purple
  • dpoggi soso
  • flazz purple
  • geoffgarside ok
  • gianu 重点试用 不算好
  • juanghurtado 重点试用 no
  • kardan 重点 soso
  • kolo ok
  • maran ok
  • mh 重点 ok
  • norm ok
  • nanotech ok
  • pygmalion ok
  • sorin purple
  • suvash ok
  • theunraveler ok
  • wedisagree ok
  • wezm purple
  • zhann purple

之前的使用结果

极好的

  1. mh
  2. garyblessington
  3. steeef
  4. sporty_256
  5. cloud
  6. terminalparty
  7. norm
  8. eastwood
  9. half-life
  10. fishy

好的

  1. peepcode
  2. maran
  3. superjarin
  4. xiong-chiamiov
  5. smt
  6. crcandy
  7. linuxonly
  8. jbergantine-theme
  9. dpoggi
  10. flazz
  11. skaro 还不错, 就是git颜色有点挫.

可以接受的

这里也不见得都是可以接受的, 有可能也有模糊的或者好的.

  1. superjarin
  2. obraun
  3. macovsky-ruby 内容不够充分, 不显示git状态
  4. gozilla
  5. example
  6. funky
  7. arrow 可以说是极好的, 但是, 显示目录的颜色实在是太挫了. 根本看不清
  8. jaischeema
  9. zhann 除了紫色的目录名, 其他, 没啥问题.
  10. fletcherm 深紫色目录名, 为啥大家这么喜欢用深紫色呢? 否则也是极好的.

看不清的

主要是颜色和字体用的都很奇怪, 模模糊糊, 这是啥效果? 类似ps的发光字了都.

  1. mira
  2. frisk
  3. duellj
  4. junkfood
  5. intheloop
  6. avit
  7. gnzh
  8. bureau
  9. mikeh

有问号的

这个也比较奇怪, 看上去都是有插件没装好的样子. 要么是半成品, 要么就是大墙导致的.

  1. emotty
  2. agnoster
  3. adben

不好的漏网之鱼

  • flazz purple
  • crcandy soso
  • garyblessington purple
  • norm purple

总结OK的, 可以一用的:

  • ​af-magic ok
  • cloud ok
  • crunch ok
  • dpoggi
  • eastwood
  • fishy
  • geoffgarside ok
  • half-life
  • jbergantine
  • kolo ok
  • linuxonly 特别推荐
  • maran ok
  • mh 重点 ok
  • nanotech ok
  • pygmalion ok
  • peepcode
  • smt
  • suvash ok
  • superjarin
  • skaro
  • steeef 特别推荐
  • sporty_256
  • theunraveler ok
  • terminalparty
  • wedisagree ok
  • xiong-chiamiov

精中选精 不折行

  • crunch
  • half-life
  • geoffgarside
  • fishy 有个紫色, 已经提出
  • wedisagree
  • eastwood
  • af-magic ! 最终我自己用的这个.
  • theunraveler

特别精选 折行

  • steeef 特别推荐
  • linuxonly 特别推荐
  • pygmalion
  • maran
自己做的才是自己最满意的
  • 然后在terminal的设置里面直接把恶心的红色改了.

    • cmd + , 呼出terminal的profiles
      • 直接修改默认的ansi colors
      • 没说的, 红色改掉
    • 取消下面的两个勾选
      • use bold fonts
      • allow blinking text
  • 定制theme

    #在echo 看到zsh位置
    echo $ZSH_CUSTOM
    #进入zsh_custem所在目录, 然后建立目录, 建立文件
    cd ~/.oh-my-zsh/custom
    mkdir themes
    mate themes/xxx.zsh-theme
    #修改~/.zshrc, 引入这个xxx.zsh-theme
    ZSH_THEME="xxx"
    #打开这个xxx.zsh-theme
    eval my_gray='$FG[250]' #这个地方他原来用的是深灰, 250是浅灰.
    #参考: https://en.wikipedia.org/wiki/ANSI_escape_code
    
  • english edition

    #first find the dir
    echo $ZSH_CUSTOM
    #second build the theme file
    cd ~/.oh-my-zsh/custom
    mkdir themes
    mate themes/xxx.zsh-theme
    #third fix the ~/.zshrc file change theme:
    ZSH_THEME="xxx"
    #fourth open your xxx.zsh-theme, u can change anything.
    
    #maybe you need copy a sample: https://github.com/robbyrussell/oh-my-zsh/tree/master/themes
    #about color u can get information from : https://en.wikipedia.org/wiki/ANSI_escape_code
    
    1. change terminal profile
      open terminal
      • cmd + , show terminal profiles
      • change any [ansi colors] that you didnot like

    if this is not effect, you need custom your theme

    1. custom your theme
      • first find the dir

    echo $ZSH_CUSTOM

    • second build the theme file

      cd ~/.oh-my-zsh/custom mkdir themes mate themes/xxx.zsh-theme

    • third fix the ~/.zshrc file change theme:

      ZSH_THEME="xxx"

    • fourth open your xxx.zsh-theme, u can change anything.

    • maybe you need copy a sample: https://github.com/robbyrussell/oh-my-zsh/tree/master/themes
    • about color u can get information from : https://en.wikipedia.org/wiki/ANSI_escape_code
      ```
  • 最终我的zshrc

​```ruby
ZSH_THEME=”random”
ZSH_THEME_RANDOM_CANDIDATES=(
“mck”
“crunch”
“half-life”
“geoffgarside”
“wedisagree”
“eastwood”
“theunraveler”
“steeef”
“linuxonly”
“pygmalion”
“maran”
)


### 最终的结论

一次更新之后, 我的自定义theme失效了, 那么, 我发现目前主要的问题集中在紫色上面, 因此就把系统默认紫色改了一下, 由此简化了步骤:

1. 改terminal的bold设置, 去掉所有的bold.
2. 改terminal的颜色设置
   1. 红色
   2. 灰色
   3. 紫色设置
3. 设置随机theme区间
4. 是在不行再自定义, 但是, 真心不推荐, 因为oh my zsh更新之后自定义就会失效. 这个Stack Overflow会解决, 但是, terminal不是我的研究方向, 因此就不和他死磕了. 

```sh
# .zshrc的列表
ZSH_THEME="random"
ZSH_THEME_RANDOM_CANDIDATES=(
  "crunch"
  "half-life"
  "geoffgarside"
  "wedisagree"
  "eastwood"
  "theunraveler"
  "steeef"
  "linuxonly"
  "pygmalion"
  "maran"
  "fishy"
  "af-magic"
  "fletcherm"
  "zhann"
  "arrow"
  "skaro"
  "mh"
  "garyblessington"
  "norm"
  "alanpeabody"
  "avit"
  "candy"
  "dieter"
  "dogenpunk"
  "wezm"
  "mira"
  "frisk"
  "duellj"
  "junkfood"
  "intheloop"
  "avit"
  "gnzh"
  "bureau"
  "mikeh"
  "flazz"
  "garyblessington"
  "norm"
  "cloud"
  "dpoggi"
  "fishy"
  "jbergantine"
  "kolo"
  "nanotech"
  "peepcode"
  "smt"
  "suvash"
  "superjarin"
  "skaro"
  "sporty_256"
  "theunraveler"
  "terminalparty"
  "wedisagree"
  "xiong-chiamiov"  
)