Last active
December 18, 2015 05:49
-
-
Save flamingm0e/5735535 to your computer and use it in GitHub Desktop.
My custom bashrc (with Alsi)
This file contains hidden or 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
# | |
# /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