Skip to content

Instantly share code, notes, and snippets.

@flamingm0e
Last active December 18, 2015 05:49
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 flamingm0e/5735535 to your computer and use it in GitHub Desktop.
Save flamingm0e/5735535 to your computer and use it in GitHub Desktop.
My custom bashrc (with Alsi)
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
red="\[\e[0;33m\]"
yellow="\[\e[0;31m\]"
if [ `id -u` -eq "0" ]; then
root="${yellow}"
else
root="${red}"
fi
PS1="\[\e[0;37m\]┌─[${root}\u\[\e[0;37m\]][\[\e[0;96m\]\h\[\e[0;37m\]][\[\e[0;32m\]\w\[\e[0;37m\]]\n\[\e[0;37m\]└──╼ \[\e[0m\]"
PS2="╾──╼ "
[ ! "$UID" = "0" ] && alsi
[ "$UID" = "0" ] && alsi -r
#PS1='[\u@\h \W]\$ '
#PS2='> '
PS3='> '
PS4='+ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
;;
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
;;
esac
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment