Created
September 23, 2017 23:38
-
-
Save thrashr888/1e20284a230110a9cb30f926a39cc0d7 to your computer and use it in GitHub Desktop.
This file contains 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
function cpu_load() { | |
ps -A -o %cpu | awk '{s+=$1} END {print s "%"}' | |
} | |
function battery_load() { | |
pmset -g batt | grep -o '[0-9]*%' | tr -d % | |
} | |
export PS1='`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[01;37m\]\u\[\033[01;36m\] \[\033[01;33m\]\t \[\033[01;37m\]($(cpu_load)) [\[\033[01;33m\]$(battery_load)⚡\[\033[01;37m\]] \[\033[01;36m\]\W\[\033[35m\]$(__git_ps1 " %s") \[\033[01;37m\]⚡\[\033[00m\] ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment