Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

profile 3.2 KiB

há 6 anos
há 6 anos
há 10 anos
há 6 anos
há 5 anos
há 10 anos
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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="-iMRX"
  32. if which bat >/dev/null
  33. then
  34. export LESSOPEN="| bat --color=always %s"
  35. # export LESSOPEN="| bat --color=always --decorations=never %s"
  36. fi
  37. if false which nvim >/dev/null
  38. then
  39. _VI_ALT=nvim
  40. elif which vim >/dev/null
  41. then
  42. _VI_ALT=vim
  43. elif which vi >/dev/null
  44. then
  45. _VI_ALT=vi
  46. fi
  47. if test -n "$_VI_ALT"
  48. then
  49. export EDITOR="$_VI_ALT"
  50. export GIT_EDITOR="$EDITOR"
  51. export VISUAL="$EDITOR"
  52. fi
  53. # export CDPATH=".:~"
  54. export GIT_PAGER="less -FRX"
  55. export GIT_MERGE_AUTOEDIT=no
  56. if test -n "$TMUX" && \
  57. expr "$TERM" : screen >/dev/null && \
  58. expr "`tmux display -p '#{client_termname}'`" : '.*-256color$' >/dev/null
  59. then
  60. TERM=screen-256color
  61. fi
  62. if test -z "$USER" -a -n "$USERNAME"
  63. then
  64. export USER=$USERNAME
  65. fi
  66. # set TMP, TEMP, TMPDIR
  67. if test -z "$TMP"
  68. then
  69. if test -n "$TMPDIR"
  70. then
  71. export TMP=$TMPDIR
  72. elif test -n "$TEMP"
  73. then
  74. export TMP="$TEMP"
  75. else
  76. export TMP=/tmp
  77. fi
  78. fi
  79. __user_md5=$(perl -e "use Digest::MD5 qw(md5_hex); print md5_hex('$USER$HOSTNAME')")
  80. expr "$TMP" : ".*${__user_md5}.*" >/dev/null || export TMP="${TMP}/${__user_md5}-tmp"
  81. test -d "$TMP" || mkdir -p "$TMP"
  82. TMP="$(cd "$TMP" && pwd)"/
  83. export TEMP=$TMP
  84. export TMPDIR=$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/.golang"
  91. export PATH="$GOPATH/bin:$PATH"
  92. export PYTHONUSERBASE=$HOME/.pip
  93. export PATH="$PYTHONUSERBASE/bin:$PATH"
  94. # Enable --user by default when running pip install
  95. export PIP_USER=1
  96. export PIPENV_VENV_IN_PROJECT=1
  97. export STARDICT_DATA_DIR=$HOME/.brew/share/sdcv-dict-oxford
  98. ###########################################
  99. # Host colors
  100. export _HOSTCOLOR_1=
  101. export _HOSTCOLOR_2=
  102. # black red green yellow blue magenta cyan white
  103. # Yellow is hard to read strings...
  104. case "`hostname`" in
  105. arch-vb-win8-vaio11)
  106. _HOSTCOLOR_1=magenta
  107. _HOSTCOLOR_2=white
  108. ;;
  109. darwin-mba.local)
  110. _HOSTCOLOR_1=cyan
  111. _HOSTCOLOR_2=black
  112. ;;
  113. # newkiwi)
  114. # _HOSTCOLOR_1=magenta
  115. # _HOSTCOLOR_2=white
  116. # ;;
  117. debian-vb-win7-opti)
  118. _HOSTCOLOR_1=red
  119. _HOSTCOLOR_2=white
  120. ;;
  121. *)
  122. _HOSTCOLOR_1=green
  123. _HOSTCOLOR_2=black
  124. ;;
  125. esac