Bashrc

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m
m
Line 9: Line 9:
 
export BASH_DEPTH
 
export BASH_DEPTH
 
export EDITOR="nano"
 
export EDITOR="nano"
PS1="\[\e[0m\]#\[\e[94m\]#\[\e[34m\]# \[\e]0;\u@\h:\w\007\]\[\e[0;33m\]\T "
+
PS1="\[\e]0;\u@\h:\w\007\]\[\e[0;33m\]\T \[\e[32m\]\u\[\e[90m\]@"
PS1="$PS1\[\e[32m\]\u\[\e[90m\]@\[\e[35m\]\h\[\e[90m\]:\[\e[36m\[\w \[\e[0m\]"
+
PS1="$PS1\[\e[35m\]\h\[\e[90m\]:\[\e[36m\[\w \[\e[0m\][\$BASH_DEPTH:\j]"
PS1="$PS1[\$BASH_DEPTH:\j] \[\e[34m\]#\[\e[94m\]#\[\e[0m\]#\n\$ "
+
if [ "`whoami`" = "root" ]; then
 +
  PS1="\[\e[0m\]#\[\e[91m\]#\[\e[31m\]# $PS1 \[\e[31m\]#\[\e[91m\]#\[\e[0m\]#"
 +
else
 +
  PS1="\[\e[0m\]#\[\e[94m\]#\[\e[34m\]# $PS1 \[\e[34m\]#\[\e[94m\]#\[\e[0m\]#"
 +
fi
 +
PS1="$PS1\n\$ "
 
export PS1
 
export PS1
 
export PATH=~/.bin:$PATH
 
export PATH=~/.bin:$PATH
  
xrdb ~/.Xresources
+
if [ "$WINDOWID" != "" ]; then
 +
  xrdb ~/.Xresources
 +
fi
  
alias nano="nano -wziSA -T 2"
+
alias nano="nano -wzSAi -T 2"
 
alias less="less -cR"
 
alias less="less -cR"
 
alias su="sudo su"
 
alias su="sudo su"

Revision as of 13:32, 9 September 2011

Below is the extended contents of my '~/.bashrc' file (after the system stuffs)

if [ "$BASH_DEPTH" = "" ]; then
  BASH_DEPTH=0
else
  BASH_DEPTH=$((BASH_DEPTH + 1))
fi
export BASH_DEPTH
export EDITOR="nano"
PS1="\[\e]0;\u@\h:\w\007\]\[\e[0;33m\]\T \[\e[32m\]\u\[\e[90m\]@"
PS1="$PS1\[\e[35m\]\h\[\e[90m\]:\[\e[36m\[\w \[\e[0m\][\$BASH_DEPTH:\j]"
if [ "`whoami`" = "root" ]; then
  PS1="\[\e[0m\]#\[\e[91m\]#\[\e[31m\]# $PS1 \[\e[31m\]#\[\e[91m\]#\[\e[0m\]#"
else
  PS1="\[\e[0m\]#\[\e[94m\]#\[\e[34m\]# $PS1 \[\e[34m\]#\[\e[94m\]#\[\e[0m\]#"
fi
PS1="$PS1\n\$ "
export PS1
export PATH=~/.bin:$PATH
 
if [ "$WINDOWID" != "" ]; then
  xrdb ~/.Xresources
fi
 
alias nano="nano -wzSAi -T 2"
alias less="less -cR"
alias su="sudo su"
alias ll="ls -l"
alias x="exit"

See also Xresources

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox