My dotfiles. Period.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 GREP_OPTIONS="--color --binary-files=without-match"
  43. # make green git bash trinket even cooler
  44. export GIT_PS1_SHOWDIRTYSTATE=true
  45. export GIT_PS1_SHOWUNTRACKEDFILES=true
  46. export GIT_DISABLED_COMMANDS="$HOME/.gittum/disabled-commands"
  47. # disable mounting things like SFTP to ~/.gvfs when accessed
  48. # via GIO (used by nautilus etc.)
  49. export GVFS_DISABLE_FUSE=1
  50. # disable the terrible beep sound (only for X; for tty?, blacklist pcspkr)
  51. [[ ${!DISPLAY[@]} ]] && xset b off
  52. # get rid of those .pyc files once and for all
  53. export PYTHONDONTWRITEBYTECODE=1
  54. ssh-add -l >& /dev/null || ssh-add