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