Você não pode selecionar mais de 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.
 
 
 
 
 
 

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