Skip to content

Instantly share code, notes, and snippets.

@jw26
Created October 9, 2014 16:02
Show Gist options
  • Select an option

  • Save jw26/c6fbb7f8e09dea6169e0 to your computer and use it in GitHub Desktop.

Select an option

Save jw26/c6fbb7f8e09dea6169e0 to your computer and use it in GitHub Desktop.
.bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
function t {
a=("★" "☆")
c=$((16 + (($RANDOM % 5) * 36) + (($RANDOM % 5) * 6) + ($RANDOM % 5)));
b=$(($RANDOM % 2))
PS1="\[\033[38;5;${c}m\]\h:";
e=$((16 + (($RANDOM % 5) * 36) + (($RANDOM % 5) * 6) + ($RANDOM % 5)));
PS1="$PS1\[\033[38;5;${e}m\]\W ";
local hw="$HOSTNAME:`basename $PWD`"
PS1="\[\033[s\]\[\033[1;\$((COLUMNS-${#hw}))f\]$PS1\n\[\033[u\]"
c=$((16 + (($RANDOM % 5) * 36) + (($RANDOM % 5) * 6) + ($RANDOM % 5)));
export c
PS1="$PS1\[\033[38;5;${c}m\]${a[b]}\[\033[0;0m\] ";
}
#export PS1="\[\033[38;5;239m\]\h:\w \[\033[38;5;196m\]•\[\033[38;5;208m\]•\[\033[38;5;226m\]•\[\033[0;0m\] "
PROMPT_COMMAND=t
PATH=$PATH
export TERM=xterm-256color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment