Skip to content

Instantly share code, notes, and snippets.

@WiggleWizard
Last active January 29, 2019 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WiggleWizard/c7b131f9d443dc6789ba to your computer and use it in GitHub Desktop.
Save WiggleWizard/c7b131f9d443dc6789ba to your computer and use it in GitHub Desktop.
Muh PS1 for Unix systems
Linux:
export PS1="\[\e[1;32m\]┌─[\[\e[1;31m\]$( free -m|awk '/^\-\/\+ buffers\/cache\:/{print $4}' )MB\[\e[1;32m\]]──[\[\e[1;33m\]\u\[\e[m\]@\[\e[1;33m\]\h\[\e[1;32m\]]──[\[\e[1;34m\]\w\[\e[1;32m\]]\n└─>$\[\e[m\] "
Mac:
export PS1='\[\e[1;32m\]┌─[\[\e[1;31m\]$( vm_stat | awk '"'"'/^Pages free\:.+/{print $3"*4096/1024/1024"}'"'"' | sed -e "s/\.//" | bc )MB\[\e[1;32m\]]──[\[\e[1;33m\]\u\[\e[m\]@\[\e[1;33m\]\h\[\e[1;32m\]]──[\[\e[1;34m\]\w\[\e[1;32m\]]\n└─>$\[\e[m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment