Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

166 строки
3.8 KiB

  1. #!/bin/sh
  2. # profile --- 10sr profile
  3. __safe_add_path_r(){
  4. # add path to right
  5. test -d "$1" && PATH="${PATH}:$1"
  6. }
  7. __safe_add_path_l(){
  8. # add path to left
  9. test -d "$1" && PATH="$1:${PATH}"
  10. }
  11. __safe_add_path_l "$HOME/.cabal/bin"
  12. __safe_add_path_l "$HOME/.local/lib/gems/bin"
  13. __safe_add_path_l "$HOME/.local/bin"
  14. __safe_add_path_l "$HOME/.gem/ruby/2.1.0/bin"
  15. __safe_add_path_r "/c/mingw/bin"
  16. __safe_add_path_r "/c/mingw/msys/1.0/bin"
  17. # macports coreutils
  18. # $isdarwin cannot be used it is not defined yet
  19. __safe_add_path_l "/opt/local/bin"
  20. __safe_add_path_l "/opt/local/sbin"
  21. __safe_add_path_l "/opt/local/libexec/gnubin"
  22. __safe_add_path_l \
  23. "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/bin"
  24. test -f "${__dotdir}/rc.py" && export PYTHONSTARTUP="${__dotdir}/rc.py"
  25. test -d "$HOME/.local/lib/python/site-packages" && \
  26. export PYTHONPATH="${PYTHONPATH}:${HOME}/.local/lib/python/site-packages"
  27. export GEM_HOME="$HOME/.local/lib/gems"
  28. export RUBYLIB="$RUBYLIB:$HOME/.local/lib/gems/lib"
  29. # it is not so good
  30. # http://archive.linux.or.jp/JF/JFdocs/Program-Library-HOWTO/shared-libraries.html
  31. # http://superuser.com/questions/324613/installing-a-library-locally-in-home-directory-but-program-doesnt-recognize-it
  32. # without this ENV i cannot run tmux. another way is to use --disable-shared
  33. # when building tmux
  34. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.local/lib"
  35. # in my environment powerdown does not work
  36. test -z "$DISPLAY" && test -z "$SSH_CONNECTION" && \
  37. type setterm >/dev/null 2>&1 && \
  38. setterm -blank 30 -powersave on # -powerdown 10
  39. ##################################
  40. # EnvVal definitions
  41. test "$TERM" = linux && export LANG=C
  42. export LC_MESSAGES=C
  43. export LC_TIME=C
  44. export TERMCAP="${TERMCAP}:vb="
  45. # export ENV=~/.shrc
  46. export PAGER="less"
  47. export LESS="-iRMX"
  48. # Style for lesspipe is defined in esc.style
  49. _src_hilite_lp_path="`command -v src-hilite-lesspipe.sh 2>/dev/null`"
  50. for f in /usr/share/source-highlight/src-hilite-lesspipe.sh
  51. do
  52. test -z "$_src_hilite_lp_path" && test -e "$f" && _src_hilite_lp_path="$f"
  53. done
  54. test -n "$_src_hilite_lp_path" && export LESSOPEN="| $_src_hilite_lp_path %s"
  55. if which nvim >/dev/null
  56. then
  57. _VI_ALT=nvim
  58. elif which vim >/dev/null
  59. then
  60. _VI_ALT=vim
  61. elif which vi >/dev/null
  62. then
  63. _VI_ALT=vi
  64. fi
  65. if test -n "$_VI_ALT"
  66. then
  67. export EDITOR="$_VI_ALT"
  68. export GIT_EDITOR="$EDITOR"
  69. export VISUAL="$EDITOR"
  70. fi
  71. # export CDPATH=".:~"
  72. export GIT_PAGER="less -F"
  73. export GIT_MERGE_AUTOEDIT=no
  74. if test -n "$TMUX" && \
  75. expr "$TERM" : screen >/dev/null && \
  76. expr "`tmux display -p '#{client_termname}'`" : '.*-256color$' >/dev/null
  77. then
  78. TERM=screen-256color
  79. fi
  80. if test -z "$USER" -a -n "$USERNAME"
  81. then
  82. export USER=$USERNAME
  83. fi
  84. # set TMP, TEMP, TMPDIR
  85. if test -z "$TMP"
  86. then
  87. if test -n "$TMPDIR"
  88. then
  89. export TMP=$TMPDIR
  90. elif test -n "$TEMP"
  91. then
  92. export TMP="$TEMP"
  93. else
  94. export TMP=/tmp
  95. fi
  96. fi
  97. expr "$TMP" : ".*$USER-tmp" >/dev/null || export TMP="${TMP}/${USER}-tmp"
  98. export TEMP=$TMP
  99. export TMPDIR=$TMP
  100. test -d "$TMP" || mkdir -p "$TMP"
  101. if test -d ~/dbx
  102. then
  103. export CHIT_PATH="$HOME/dbx/.chit"
  104. fi
  105. export JAVA_OPTS="$JAVA_OPTS -Duser.language=en"
  106. export GOPATH="$HOME/my/go"
  107. export PATH="$GOPATH/bin:$PATH"
  108. ###########################################
  109. # Host colors
  110. export _HOSTCOLOR_1=
  111. export _HOSTCOLOR_2=
  112. # black red green yellow blue magenta cyan white
  113. # Yellow is hard to read strings...
  114. case "`hostname`" in
  115. arch-vb-win8-vaio11)
  116. _HOSTCOLOR_1=magenta
  117. _HOSTCOLOR_2=white
  118. ;;
  119. arch-mba)
  120. _HOSTCOLOR_1=cyan
  121. _HOSTCOLOR_2=black
  122. ;;
  123. newkiwi)
  124. _HOSTCOLOR_1=magenta
  125. _HOSTCOLOR_2=white
  126. ;;
  127. debian-vb-win7-opti)
  128. _HOSTCOLOR_1=red
  129. _HOSTCOLOR_2=white
  130. ;;
  131. *)
  132. _HOSTCOLOR_1=green
  133. _HOSTCOLOR_2=black
  134. ;;
  135. esac