Skip to content

Instantly share code, notes, and snippets.

@gorakhargosh
Created March 15, 2012 12:55
Show Gist options
  • Select an option

  • Save gorakhargosh/2044065 to your computer and use it in GitHub Desktop.

Select an option

Save gorakhargosh/2044065 to your computer and use it in GitHub Desktop.
# From: https://wiki.archlinux.org/index.php/Color_Bash_Prompt
# Uncomment to enable.
#export PROMPT_COMMAND='history -a;echo -en "\n\n\033[m\033[38;5;2m"$(( `sed -nu "s/MemFree:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo`/1024))"\033[38;5;22m/"$((`sed -nu "s/MemTotal:[\t ]\+\([0-9]\+\) kB/\1/Ip" /proc/meminfo`/1024 ))MB"\t\033[m\033[38;5;55m$(< /proc/loadavg)\033[m"'
#export PS1='\[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\[\e[0;36m\] \T \d \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]:\[\e[0;37m\]${SSH_TTY} \[\e[0;32m\]+${SHLVL}\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n\e[0;30m($SHLVL:\!)\n\w\$ '
export PS1='\[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\n\[\e[0;36m\]\T \d \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]:\[\e[0;37m\]${SSH_TTY} \[\e[0;32m\]+${SHLVL}\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n\e[0;30m\w\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment