Advertisement
jv2112

bashrc

Jun 29th, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.32 KB | None | 0 0
  1. #
  2. # ~/.bashrc
  3. #
  4.  
  5. # If not running interactively, don't do anything
  6. [[ $- != *i* ]] && return
  7.  
  8.  
  9. # Joe Mods
  10.  
  11. alias ls='ls --color=auto'
  12. alias grep='grep --color=auto'
  13. alias fgrep='fgrep --color=auto'
  14. alias egrep='egrep --color=auto'
  15. alias vi="vim"
  16. # alias mount="mount | column -t"
  17. alias pacman="sudo pacman"
  18. alias tunes="ncmpcpp"
  19. alias youtube-dl="youtube-dl -ci -o '%(title)s-%(upload_date)s-%(ext)s'"
  20. alias cp='vcp'
  21. #alias mv='vmv'
  22. alias gn='geeknote'
  23.  
  24. PATH=/usr/local/sbin:/usr/lib:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/joe/Scripts:/home/joe/bin:/var/run/user/1000/gvfs/
  25.  
  26. HISTCONTROL=ignoredups
  27. HISTCONTROL=erasedups
  28. PROMPT_COMMAND='history -a; history -n' # write command to histopry when issued as opposed to the default end of session.
  29. shopt -s histappend # append - not truncate
  30. shopt -s checkwinsize # checks window size after each command and refreshes screen.
  31. HISTFILESIZE=3000
  32. HISTSIZE=3000
  33.  
  34. PS1="\[\e[00;31m\][- \[\e[107;34m\]\u@\h\[\e[00;31m\]- ]
  35. |-\[\e[107;31m\] in [* \W * ]\[\e[00;31m\]-|-->\[\e[00m\]"
  36.  
  37.  
  38.  
  39. PS2="\e[04;31mContinue Please\e[00m->  "
  40. HISTTIMEFORMAT='%D -> '
  41. PROMPT_DIRTRIM=3
  42.  
  43. EDITOR=vim; export $EDITOR
  44.  
  45. # Functions ---
  46.  
  47.  
  48.  
  49. up ()
  50.     {
  51.     sudo yaourt -Syy
  52.     sudo yaourt -Syu
  53.     sudo pacman -Syc
  54.     }
  55.  
  56. Abigail-Tux ()
  57.     {
  58.     clear
  59.     figlet Abigail-Tux
  60.     ssh -X abigail@10.0.0.246
  61.     }
  62.  
  63. Kevin-Tux ()
  64.  
  65.     {
  66.     clear
  67.     figlet Kevin-Tux
  68.     ssh -X joe@10.0.0.247
  69.     }
  70.  
  71. Aiden-Tux ()
  72.     {
  73.     clear
  74.     figlet Aiden-Tux
  75.     ssh -X aiden@10.0.0.248
  76.     }
  77.  
  78. Envy-Tux ()
  79.     {
  80.     clear
  81.     figlet Envy-Tux
  82.     ssh -X joe@10.0.0.249
  83.     }
  84.  
  85. Tux-Box ()
  86.     {
  87.     clear
  88.     figlet Tux-Box
  89.     ssh -X joe@10.0.0.250
  90.     }
  91.  
  92. goodnight ()
  93.  
  94.     {
  95.     ssh aiden@10.0.0.16 'sudo shutdown -h now && exit'
  96.     echo -e "\e[00;31m Aiden-Tux has been shutdown for the night $USER \e[00m"
  97.     echo
  98.     echo -e "\e[00;32m --- Processing ---- \e[00m"
  99.     ssh joe@10.0.0.22 'sudo shutdown -h now && exit'
  100.     echo
  101.     echo -e "\e[00;31m Kevin-Tux has been shutdown for the night $USER \e[00m"
  102.  
  103.     ssh abigail@10.0.0.23 'sudo shutdown -h now && exit'
  104.     echo -e "\e[00;31m Abigail-Tux has been shutdown for the night $USER \e[00m"
  105.     echo
  106.     echo -e "\e[00;32m --- Processing ---- \e[00m"
  107.  
  108.     ssh family@10.0.0.28 'sudo shutdown -h now && exit'
  109.     echo -e "\e[00;31m Aiden-Tux has been shutdown for the night $USER \e[00m"
  110.     echo
  111.     echo -e "\e[00;32m --- Processing ---- \e[00m"
  112.  
  113.     }
  114.  
  115.    
  116. # Enhance colored ls output; for example, broken (orphan) symlinks will start showing in a red hue. Add the following to ~/.bashrc and relogin, or source the file:
  117. eval $(dircolors -b)
  118.  
  119. export GREP_COLOR="1;33"
  120.  
  121. # Enable code syntax coloring by adding
  122. export LESS="-R"
  123.  
  124. # Name of the host with T-Mux
  125. case "$TERM" in
  126.     screen*)
  127.             PROMPT_COMMAND="printf '\033k$(hostname -s)\033\\';"${PROMPT_COMMAND}
  128.                 ;;
  129.             esac
  130. case "$TERM" in
  131.     xterm*) TERM=xterm-256color
  132.     esac
  133.  
  134. # Color Man Pages
  135.    man () \
  136.    {
  137.     env \
  138.     LESS_TERMCAP_mb=$(printf "\e[1;37m") \
  139.     LESS_TERMCAP_md=$(printf "\e[1;37m") \
  140.     LESS_TERMCAP_me=$(printf "\e[0m") \
  141.     LESS_TERMCAP_se=$(printf "\e[0m") \
  142.     LESS_TERMCAP_so=$(printf "\e[1;47;30m") \
  143.     LESS_TERMCAP_ue=$(printf "\e[0m") \
  144.     LESS_TERMCAP_us=$(printf "\e[0;36m") \
  145.     man "$@"
  146.                                                                         }
  147.  
  148.  
  149.  
  150. # tab completion for sudo commands:
  151. complete -cf sudo
  152.  
  153. # Terminal Launch
  154. alsi -c1=white -c2=red -t -u
  155. who -luHb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement