.bashrc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #
  2. # ~/.bashrc
  3. #
  4. # If not running interactively, don't do anything
  5. [[ $- != *i* ]] && return
  6. # Make colorcoding available for everyone
  7. Black='\[\e[0;30m\]' # Black
  8. Red='\[\e[0;31m\]' # Red
  9. Green='\[\e[0;32m\]' # Green
  10. Yellow='\[\e[0;33m\]' # Yellow
  11. Blue='\[\e[0;34m\]' # Blue
  12. Purple='\[\e[0;35m\]' # Purple
  13. Cyan='\[\e[0;36m\]' # Cyan
  14. White='\[\e[0;37m\]' # White
  15. # Bold
  16. BBlack='\[\e[1;30m\]' # Black
  17. BRed='\[\e[1;31m\]' # Red
  18. BGreen='\[\e[1;32m\]' # Green
  19. BYellow='\[\e[1;33m\]' # Yellow
  20. BBlue='\[\e[1;34m\]' # Blue
  21. BPurple='\[\e[1;35m\]' # Purple
  22. BCyan='\[\e[1;36m\]' # Cyan
  23. BWhite='\[\e[1;37m\]' # White
  24. # Background
  25. On_Black='\[\e[40m\]' # Black
  26. On_Red='\[\e[41m\]' # Red
  27. On_Green='\[\e[42m\]' # Green
  28. On_Yellow='\[\e[43m\]' # Yellow
  29. On_Blue='\[\e[44m\]' # Blue
  30. On_Purple='\[\e[45m\]' # Purple
  31. On_Cyan='\[\e[46m\]' # Cyan
  32. On_White='\[\e[47m\]' # White
  33. NC='\[\e[m\]' # Color Reset
  34. ALERT="${BWhite}${On_Red}" # Bold White on red background
  35. # Useful aliases
  36. alias c='clear'
  37. alias ..='cd ..'
  38. alias ll='ls -CF --color=auto'
  39. alias ll='ls -lisa --color=auto'
  40. alias mkdir='mkdir -pv'
  41. alias free='free -mt'
  42. alias ps='ps auxf'
  43. alias psgrep='ps aux | grep -v grep | grep -i -e VSZ -e'
  44. alias wget='wget -c'
  45. alias histg='history | grep'
  46. alias myip='curl ipv4.icanhazip.com'
  47. alias grep='grep --color=auto'
  48. # Set PATH so it includes user's private bin directories
  49. PATH="${HOME}/bin:${HOME}/.local/bin:${HOME}/src/scripts:${HOME}/script:${PATH}"
  50. # Set prompt
  51. PS1="${Yellow}\u@\h${NC}: ${Blue}\w${NC} \\$ "
  52. export ANDROID_HOME=/opt/android-sdk/
  53. export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
  54. export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools
  55. export BROWSER="surf -bdfgIS"
  56. # bash aliases
  57. if [ -f ~/.bash_aliases ]; then
  58. . ~/.bash_aliases
  59. fi
  60. # bash git prompt
  61. if [ -f ~/src/bash-git-prompt/gitprompt.sh ]; then
  62. # To only show the git prompt in or under a repository directory
  63. GIT_PROMPT_ONLY_IN_REPO=1
  64. # To use upstream's default theme
  65. GIT_PROMPT_THEME=Default
  66. source ~/src/bash-git-prompt/gitprompt.sh
  67. fi