Last active
November 30, 2015 23:27
-
-
Save scherler/99f99e8ac0749578b338 to your computer and use it in GitHub Desktop.
cb.zsh-theme
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
| setopt prompt_subst | |
| function get_RAM { | |
| local FREE_RAM=`free -m | awk '{if (NR==3) print $4}' | xargs -i echo 'scale=1;{}/1000' | bc` | |
| local TOTAL_RAM=`free -m | awk '{if (NR==2) print $2}'| xargs -i echo 'scale=1;{}/1000' | bc` | |
| echo "%{$fg_bold[red]%}$FREE_RAM" | |
| } | |
| PROMPT='%(?,%{$fg_bold[green]%},%{$fg_bold[red]%})◎ % ' | |
| RPS1='$(get_RAM)G %{$fg[green]%}%3~ $(git_prompt_info)%{$fg[yellow]%}%* %{$fg[blue]%}%n%{$reset_color%}' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}✔" | |
| ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✘" |
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
| oh-my.zsh my personal stuff | |
| For now the theme. | |
| Just place the content in a cb.zsh-theme file in $ZSH/themes/ and activate it in .zshrc with | |
| ZSH_THEME="cb" |
I plan to make the ram color depend on the percentage left, so e.g. red for under 15%
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first is free RAM the other self explaining.