You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.txt 2.3 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
12 years ago
11 years ago
12 years ago
12 years ago
12 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Dotfiles
  2. ========
  3. First Principle
  4. ---------------
  5. __Do not go out of ways how the default environments work__.
  6. There are many cases when I must work on foreign environments, and it is always
  7. VERY irritating when things do not work as I expected, yet setting up my own
  8. environment is troublesome. So I avoid changing behaviors of tools, except
  9. for emacs.
  10. Emacs is the editor I usually use for coding. I decided to change the behavior
  11. of emacs as I want without thinking about other environments. When I cannot use
  12. my emacs.el I'll use vi or vim instead.
  13. Other tools like bash and vim basically work in the same ways even when using my
  14. rc files. The main changes are related to showing informations, typically in the
  15. bash prompt.
  16. shrc.common
  17. -----------
  18. `setup.sh` will create file "$HOME/.shrc.common". This file define some
  19. variables that can be used to detect system type. This file is sourced from
  20. both `setup.sh` and `shrc`.
  21. Sourcing flow
  22. -------------
  23. 1. $HOME/.profile
  24. Sourced if:
  25. currnet shell is login shell and
  26. (current shell is sh ||
  27. (current shell is bash && $HOME/.bash_profile does not exist) ||
  28. (current shell is zsh && $HOME/.zprofile does not exist))
  29. This file set ENV to $HOME/.shrc , which is loaded when sh is run interactively.
  30. Add lines like `test -n "$BASH_VERSION" && . "$HOME/.bashrc"` .
  31. 2.$HOME/{.bash_profile,.zprofile}
  32. Sourced if current shell is login shell and shell is bash or zsh.
  33. Srouce $HOME/.profile .
  34. 3. $HOME/.shrc
  35. Sourced through ENV when shell is sh, and $HOME/.{ba,z}shrc if bash or zsh
  36. respectively. Source $HOME/.dotfiles/shrc .
  37. 4. $HOME/.{ba,z}shrc
  38. Sourced when current shell is bash or zsh respectively and current shell is not
  39. login shell. When current shell is login shell, these files are sourced
  40. explicitly by $HOME/.profile . Source $HOME/.shrc .
  41. $HOME/{.bash_profile,.zprofile} <= login with bash/zsh
  42. |
  43. `--$HOME/.profile <= login with sh
  44. | |
  45. | `--$HOME/.{ba,z}shrc <= bash, zsh
  46. | |
  47. `----`--$HOME/.shrc <= sh
  48. |
  49. `--$HOME/.dotfiles/shrc
  50. ~/.xinitrc <= startx
  51. |
  52. `--openbox-session
  53. |
  54. |--~/.dotfiles/xprofile
  55. |
  56. `--~/.dotfiles/xprograms
  57. Get setup.sh
  58. ------------
  59. Issue
  60. curl -L j.mp/10sr_setup >setup.sh
  61. to get latest setup.sh .