My dotfiles. Period.

main.bashrc 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. clear_to_bottom() {
  17. clear
  18. for ((i=1; i<=$LINES; i++));
  19. do
  20. echo "$n"
  21. done
  22. }
  23. ### .... ###
  24. ### BASH ###
  25. ### '''' ###
  26. export HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
  27. export HISTIGNORE=$HISTIGNORE:ls:ll:la:cd
  28. export HISTIGNORE="$HISTIGNORE:git ap:git cm:git cma:git dc:git st"
  29. export GLOBIGNORE=.:..
  30. # some more aliases
  31. alias cls='clear'
  32. alias clsz='clear_to_bottom'
  33. alias ll='ls -lh'
  34. alias lla='ls -lha'
  35. alias open='gnome-open'
  36. alias diff='diff -u'
  37. alias pad4='sed -e "s/^/ /"'
  38. alias grepr='grep -nr . -e'
  39. alias sc='se --direction=encz.cz'
  40. ### ...... ###
  41. ### OTHERS ###
  42. ### '''''' ###
  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