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.
 
 
 
 
 
 

149 regels
3.1 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/.gem/ruby/2.1.0/bin"
  14. __safe_add_path_l "$HOME/.local/bin"
  15. __safe_add_path_r "/c/mingw/bin"
  16. __safe_add_path_r "/c/mingw/msys/1.0/bin"
  17. export GEM_HOME="$HOME/.local/lib/gems"
  18. export RUBYLIB="$RUBYLIB:$HOME/.local/lib/gems/lib"
  19. # in my environment powerdown does not work
  20. test -z "$DISPLAY" && test -z "$SSH_CONNECTION" && \
  21. type setterm >/dev/null 2>&1 && \
  22. setterm -blank 30 -powersave on # -powerdown 10
  23. ##################################
  24. # EnvVal definitions
  25. test "$TERM" = linux && export LANG=C
  26. export LC_MESSAGES=C
  27. export LC_TIME=C
  28. export TERMCAP="${TERMCAP}:vb="
  29. # export ENV=~/.shrc
  30. export PAGER="less"
  31. export LESS="-iMX"
  32. # Style for lesspipe is defined in esc.style
  33. _src_hilite_lp_path="`command -v src-hilite-lesspipe.sh 2>/dev/null`"
  34. for f in /usr/share/source-highlight/src-hilite-lesspipe.sh
  35. do
  36. test -z "$_src_hilite_lp_path" && test -e "$f" && _src_hilite_lp_path="$f"
  37. done
  38. test -n "$_src_hilite_lp_path" && export LESSOPEN="| $_src_hilite_lp_path %s"
  39. if false which nvim >/dev/null
  40. then
  41. _VI_ALT=nvim
  42. elif which vim >/dev/null
  43. then
  44. _VI_ALT=vim
  45. elif which vi >/dev/null
  46. then
  47. _VI_ALT=vi
  48. fi
  49. if test -n "$_VI_ALT"
  50. then
  51. export EDITOR="$_VI_ALT"
  52. export GIT_EDITOR="$EDITOR"
  53. export VISUAL="$EDITOR"
  54. fi
  55. # export CDPATH=".:~"
  56. export GIT_PAGER="less -FRX"
  57. export GIT_MERGE_AUTOEDIT=no
  58. if test -n "$TMUX" && \
  59. expr "$TERM" : screen >/dev/null && \
  60. expr "`tmux display -p '#{client_termname}'`" : '.*-256color$' >/dev/null
  61. then
  62. TERM=screen-256color
  63. fi
  64. if test -z "$USER" -a -n "$USERNAME"
  65. then
  66. export USER=$USERNAME
  67. fi
  68. # set TMP, TEMP, TMPDIR
  69. if test -z "$TMP"
  70. then
  71. if test -n "$TMPDIR"
  72. then
  73. export TMP=$TMPDIR
  74. elif test -n "$TEMP"
  75. then
  76. export TMP="$TEMP"
  77. else
  78. export TMP=/tmp
  79. fi
  80. fi
  81. expr "$TMP" : ".*$USER-tmp" >/dev/null || export TMP="${TMP}/${USER}-tmp"
  82. export TEMP=$TMP
  83. export TMPDIR=$TMP
  84. test -d "$TMP" || mkdir -p "$TMP"
  85. if test -d ~/dbx
  86. then
  87. export CHIT_PATH="$HOME/dbx/.chit"
  88. fi
  89. export JAVA_OPTS="$JAVA_OPTS -Duser.language=en"
  90. export GOPATH="$HOME/my/go"
  91. export PATH="$GOPATH/bin:$PATH"
  92. export PIPENV_VENV_IN_PROJECT=1
  93. export STARDICT_DATA_DIR=$HOME/.brew/share/sdcv-dict-oxford
  94. ###########################################
  95. # Host colors
  96. export _HOSTCOLOR_1=
  97. export _HOSTCOLOR_2=
  98. # black red green yellow blue magenta cyan white
  99. # Yellow is hard to read strings...
  100. case "`hostname`" in
  101. arch-vb-win8-vaio11)
  102. _HOSTCOLOR_1=magenta
  103. _HOSTCOLOR_2=white
  104. ;;
  105. darwin-mba.local)
  106. _HOSTCOLOR_1=cyan
  107. _HOSTCOLOR_2=black
  108. ;;
  109. newkiwi)
  110. _HOSTCOLOR_1=magenta
  111. _HOSTCOLOR_2=white
  112. ;;
  113. debian-vb-win7-opti)
  114. _HOSTCOLOR_1=red
  115. _HOSTCOLOR_2=white
  116. ;;
  117. *)
  118. _HOSTCOLOR_1=green
  119. _HOSTCOLOR_2=black
  120. ;;
  121. esac