My dotfiles. Period.

main.bashrc 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/bash
  2. #######################################################
  3. ### things to do BEFORE host/user-specific settings ###
  4. #######################################################
  5. ### .... ###
  6. ### SUBZ ###
  7. ### '''' ###
  8. git() {
  9. if grep -Fwqse "$1" "$GIT_DISABLED_COMMANDS"; then
  10. echo "You don't want this." >&2
  11. return 1
  12. else
  13. command git "$@"
  14. fi
  15. }
  16. clsz() {
  17. tput clear; tput cup $(tput lines) 0
  18. }
  19. ### .... ###
  20. ### BASH ###
  21. ### '''' ###
  22. export HISTCONTROL=$HISTCONTROL${HISTCONTROL:+:}ignoredups
  23. export HISTIGNORE=$HISTIGNORE:ls:ll:la:cd
  24. export HISTIGNORE="$HISTIGNORE:git ap:git cm:git cma:git dc:git st"
  25. export HISTIGNORE="$HISTIGNORE:se *:sc *"
  26. export HISTFILESIZE=10000
  27. export GLOBIGNORE=.:..
  28. # some more aliases
  29. alias cal='cal -m'
  30. alias cls='clear'
  31. alias ll='ls -lh'
  32. alias lla='ls -lha'
  33. alias open='gnome-open'
  34. alias diff='diff -u'
  35. alias pad4='sed -e "s/^/ /"'
  36. alias grepr='grep -nr . --exclude-dir=".git" -e '
  37. alias sc='se --direction=encz.cz'
  38. ### ...... ###
  39. ### OTHERS ###
  40. ### '''''' ###
  41. export FFOO_MKPRETTY=color
  42. export EECC_INI_PATH="$HOME/.eecc/private/personal"
  43. export GREP_OPTIONS="--color --binary-files=without-match"
  44. # make green git bash trinket even cooler
  45. export GIT_PS1_SHOWDIRTYSTATE=true
  46. export GIT_PS1_SHOWUNTRACKEDFILES=true
  47. export GIT_DISABLED_COMMANDS="$HOME/.gittum/disabled-commands"
  48. # disable mounting things like SFTP to ~/.gvfs when accessed
  49. # via GIO (used by nautilus etc.)
  50. export GVFS_DISABLE_FUSE=1
  51. # disable the terrible beep sound (only for X; for tty?, blacklist pcspkr)
  52. [[ ${!DISPLAY[@]} ]] && xset b off
  53. # get rid of those .pyc files once and for all
  54. export PYTHONDONTWRITEBYTECODE=1
  55. ssh-add -l >& /dev/null || ssh-add