Last active
March 2, 2020 12:49
-
-
Save xjasonlyu/f5f2f191eeb29bc4d61d8a52252ebb77 to your computer and use it in GitHub Desktop.
Oh-My-Zsh-Themes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # FISHY: ZSH Theme emulating the Fish shell's default prompt. | |
| _fishy_collapsed_wd() { | |
| echo $(pwd | perl -pe ' | |
| BEGIN { | |
| binmode STDIN, ":encoding(UTF-8)"; | |
| binmode STDOUT, ":encoding(UTF-8)"; | |
| }; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g | |
| ') | |
| } | |
| local _color='green'; [ $UID -eq 0 ] && _color='red' | |
| local _usr='%{$fg[$_color]%}%n%{$reset_color%}@%m' | |
| local _cwd='%{$fg[$_color]%}$(_fishy_collapsed_wd)%{$reset_color%}' | |
| local _git='$(git_prompt_info)$(git_prompt_status)%{$reset_color%}' | |
| local _status='%{$fg_bold[red]%}%(?.. [%?])%{$reset_color%}' | |
| PROMPT="$_usr $_cwd$_git$_status%(!.#.>) " | |
| ZSH_THEME_GIT_PROMPT_PREFIX=" (" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX=")" | |
| ZSH_THEME_GIT_PROMPT_DIRTY="" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ZSH Theme: Hybird (fishy jreese) | |
| _collapsed_wd() { | |
| echo $(pwd | perl -pe ' | |
| BEGIN { | |
| binmode STDIN, ":encoding(UTF-8)"; | |
| binmode STDOUT, ":encoding(UTF-8)"; | |
| }; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g | |
| ') | |
| } | |
| local user_color="%(!.%{$fg[red]%}.%{$fg[green]%})" | |
| PROMPT='${user_color}%n%{$fg[green]%}@%m %{$fg[blue]%}$(_collapsed_wd)%{$fg[red]%}%(!.$.>)%{$reset_color%} ' | |
| PROMPT2='%{$fg[red]%}\ %{$reset_color%}' | |
| local return_status="%{$fg_bold[red]%}%(?..%? )%{$reset_color%}" | |
| RPROMPT="${RPROMPT}"'${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}±" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="" | |
| ZSH_THEME_GIT_PROMPT_DIRTY="" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="" | |
| ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+" | |
| ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!" | |
| ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-" | |
| ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>" | |
| ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#" | |
| ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ZSH Theme: Hybird2 (fishy jreese linuxonly) | |
| local c0="%{$reset_color%}" | |
| local c1="${FG[215]}" | |
| local c2="${FG[209]}" | |
| local c3="${FG[203]}" | |
| local c4="${FG[4]}" | |
| local c5="${FG[137]}" | |
| local c6="${FG[240]}" | |
| local c7="${FG[149]}" | |
| local c8="${FG[126]}" | |
| local c9="${FG[162]}" | |
| autoload -U add-zsh-hook | |
| autoload -Uz vcs_info | |
| zstyle ':vcs_info:*' actionformats \ | |
| '%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' | |
| zstyle ':vcs_info:*' formats \ | |
| "%{$c8%}%s%{$c7%}:%{$c7%}(%{$c9%}%b%{$c7%})%f " | |
| zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' | |
| zstyle ':vcs_info:*' enable git | |
| add-zsh-hook precmd prompt_jnrowe_precmd | |
| _collapsed_wd() { | |
| echo $(pwd | perl -pe ' | |
| BEGIN { | |
| binmode STDIN, ":encoding(UTF-8)"; | |
| binmode STDOUT, ":encoding(UTF-8)"; | |
| }; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g | |
| ') | |
| } | |
| prompt_jnrowe_precmd () { | |
| vcs_info | |
| PROMPT='%(!.%{$fg[red]%}.%{$fg[green]%})%n%{$c1%}@%{$c4%}%m%{$c0%}:%{$c3%}%l%{$c6%}->\ | |
| %{$fg[blue]%}$(_collapsed_wd)%{$c0%} (%{$c5%}%?%{$c0%})' | |
| if [ "${vcs_info_msg_0_}" != "" ]; then PROMPT="${PROMPT}"' ${vcs_info_msg_0_}%{$c0%}' fi | |
| PROMPT="${PROMPT}"' | |
| %{$fg_bold[red]%}%(!.$.>)%{$reset_color%} ' | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment