.bashrc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. # ~/.bashrc: executed by bash (1) for non-login shells.
  2. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  3. # for examples
  4. #set -o vi
  5. #export GIT_ASKPASS=
  6. #export SSH_ASKPASS=
  7. export PASSWORD_STORE_CLIP_TIME=180
  8. export SSH_AUTH_SOCK="/run/user/$(id -u)/gnupg/S.gpg-agent.ssh"
  9. export CUPS_GSSSERVICENAME="ipp"
  10. #export XAUTHORITY=~/.Xauthority
  11. #export CALCURSE_CALDAV_PASSWORD="$(~/.config/vdirsyncer/imta-password.sh) calcurse-caldav"
  12. export CLASSPATH=${CLASSPATH}:.
  13. #export NXJ_HOME="/home/jcb/workspace/lejos_nxj"
  14. #export LEJOS_CLASSPATH="/home/jcb/workspace/lejos_nxj/lib/classes.jar"
  15. #export JAVA_3D="/usr/share/sun-java3d-bin/lib/j3dcore.jar:/usr/share/sun-java3d-bin/lib/j3dutils.jar"
  16. #export JAVA_OPTS="-Xms768m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -d32 -Djava.awt.headless=true"
  17. #export JAVA_OPTS="-d64":$JAVA_OPTS
  18. #=============================================================================
  19. # tom
  20. #export TOM_HOME=${HOME}/tom/git-repo/src/dist
  21. #Tom stable local
  22. #export TOM_HOME=${HOME}/tom/git-repo/stable/dist
  23. #export PATH=${TOM_HOME}/bin:${LEJOS_PATH}:${PATH}
  24. #old method:
  25. #export TOM_LIB=`echo ${TOM_HOME}/lib/*/*.jar | tr ' ' ':'`
  26. #export TOM_RUNTIME=`echo ${TOM_HOME}/lib/runtime/*.jar | tr ' ' ':'`
  27. #export TOM_TOOLS=`echo ${TOM_HOME}/lib/tools/*.jar | tr ' ' ':'`
  28. #export TOM_CLASSPATH=${TOM_RUNTIME}:${TOM_LIB}:${TOM_TOOLS}
  29. #export TOM_EMF_CLASSPATH=`echo ${TOM_HOME}/lib/tools/org.eclipse.*.jar | tr ' ' ':'`
  30. #export TOM_EMF_CLASSPATH=`echo ${TOM_HOME}/lib/tools/org.eclipse.emf.*.jar | tr ' ' ':'`
  31. #export CLASSPATH=/home/jcb/workspace/ipp/work/lib/jgll.jar:${TOM_EMF_CLASSPATH}:${CLASSPATH} #
  32. #:${EMF_CLASSPATH} #:${SYS_CLASSPATH} # #:${PLUGINECLIPSE_CLASSPATH} #::${LEJOS_CLASSPATH}"
  33. #new method:
  34. #export CLASSPATH=${TOM_HOME}/lib/tom-runtime-full.jar:${TOM_HOME}lib/tom-compiler-full.jar:${CLASSPATH}
  35. #export ADA_INCLUDE_PATH=${TOM_HOME}/lib/compiletime/sl-ada:${ADA_INCLUDE_PATH}
  36. #=============================================================================
  37. export SCALA_CLASSPATH=${HOME}/dl/scala-swing_2.11-2.0.0-M2.jar
  38. export CLASSPATH=${CLASSPATH}:${SCALA_CLASSPATH}
  39. #=============================================================================
  40. #export W3MIMGDISPLAY_PATH=/usr/libexec/w3m/w3mimgdisplay
  41. HOMEINSTALLPREFIX=${HOME}/install
  42. HOMEINSTALLPATH=${HOMEINSTALLPREFIX}:${HOMEINSTALLPREFIX}/activator-dist-1.3.7/:${HOMEINSTALLPREFIX}/compcert/bin:${HOMEINSTALLPREFIX}/tor-browser/:${HOMEINSTALLPREFIX}/ltsatool/:${HOMEINSTALLPREFIX}/AtelierB/atelierb-4.2/:${HOMEINSTALLPREFIX}/jgrasp:${HOMEINSTALLPREFIX}/cesium_duniter/nw/:${HOMEINSTALLPREFIX}/cesium_duniter/:${HOMEINSTALLPREFIX}/duniter/:${HOMEINSTALLPREFIX}/duniter/bin/:${HOMEINSTALLPREFIX}/evince_syntex:${HOME}/.dwarf-fortress/:${HOMEINSTALLPREFIX}/opam/:${HOMEINSTALLPREFIX}/vcstool/bin/:${HOMEINSTALLPREFIX}/JabRef/bin:${HOMEINSTALLPREFIX}/Battery/:${HOMEINSTALLPREFIX}/spark/
  43. #:${HOMEINSTALLPREFIX}/ddgr/bin/:${HOMEINSTALLPREFIX}/tuir/
  44. GITPREFIX=${HOME}/git-repo
  45. GITPATH=${GITPREFIX}/imgur-screenshot/:${GITPREFIX}/taf-ilsd/contenu/fiab/kbrw/imt_order_chapitre2/:${GITPREFIX}/mdr/:${GITPREFIX}/glow/
  46. CARGOBIN=${HOME}/.cargo/bin
  47. CABALBIN=${HOME}/.cabal/bin
  48. LOCALBIN=${HOME}/.local/bin
  49. #:~/pharo/Pillar/
  50. MYPATH=~/eclipseSoft/:${TOM_HOME}/install/pharo/:${TOM_HOME}/bin:${HOMEINSTALLPATH}:${CABALBIN}:${LOCALBIN}:${CARGOBIN}:${GITPATH}:${HOMEINSTALLPATH}/tor-browser
  51. ### TEXINPUTS ###
  52. export TEXDIR=${HOME}/install/TEXDIR
  53. #pour latex et makeDoc.pl dans info-utils/
  54. INFO_UTILS=${HOME}/svn/info-utils
  55. SEMASCOP=${HOME}/git-repo/semascop
  56. SEMASCOP_TEXINPUTS=${SEMASCOP}/tex-utils:${SEMASCOP}/tex-utils/Modele
  57. CAPRICA=${HOME}/git-repo/caprica
  58. #OLD_CAPRICA_COMMON_ASSETS_DIR=${CAPRICA}/common-assets/tex/latex
  59. #OLD_CAPRICA_COMMON_ASSETS=${OLD_CAPRICA_COMMON_ASSETS_DIR}/common-assets/images:${OLD_CAPRICA_COMMON_ASSETS}/common-assets/signatures:${OLD_CAPRICA_COMMON_ASSETS}/beamer-Arkea:${OLD_CAPRICA_COMMON_ASSETS}/beamer-Arkea/images:
  60. #OLD_CAPRICA_BEAMER_THEMES_DIR=${CAPRICA}/beamer-themes/tex/latex
  61. #OLD_CAPRICA_BEAMER_THEMES=${OLD_CAPRICA_BEAMER_THEMES_DIR}/common-assets/images:${OLD_CAPRICA_BEAMER_THEMES_DIR}/beamer-Arkea:${OLD_CAPRICA_BEAMER_THEMES_DIR}/beamer-Arkea/images
  62. #OLD_CAPRICA_STUFF=${OLD_CAPRICA_COMMON_ASSETS_DIR}:${OLD_CAPRICA_BEAMER_THEMES}
  63. CAPRICA_COMMON_ASSETS_DIR=${CAPRICA}/common-assets
  64. CAPRICA_COMMON_ASSETS=`echo ${CAPRICA_COMMON_ASSETS_DIR}/* | tr ' ' ': '`
  65. CAPRICA_BEAMER_THEMES_DIR==${CAPRICA}/beamer-themes
  66. CAPRICA_BEAMER_THEMES=`echo ${CAPRICA_BEAMER_THEMES_DIR}/* | tr ' ' ': '`
  67. CAPRICA_LATEX_ASSETS_DIR=${CAPRICA}/latex-assets
  68. CAPRICA_LATEX_ASSETS=`echo ${CAPRICA_LATEX_ASSETS_DIR}/* | tr ' ' ': '`
  69. #${OLD_CAPRICA_STUFF}:
  70. CAPRICA_TEXINPUTS=${CAPRICA_COMMON_ASSETS}:${CAPRICA_BEAMER_THEMES}:${CAPRICA_LATEX_ASSETS}
  71. #export BIBINPUTS=${HOME}/recherche/jabrefBibs
  72. #.bib de Benjamin
  73. export BIBINPUTS=.:${HOME}/git-repo/caprica/bibliography/bib/
  74. export TEXINPUTS=.:${INFO_UTILS}:${INFO_UTILS}/styles/trunk:${INFO_UTILS}/images:${INFO_UTILS}/images/CC:${SEMASCOP_TEXINPUTS}:${CAPRICA_TEXINPUTS}:${TEXDIR}:${HOME}/git-repo/betterIMTABeamerTemplate/:
  75. ### /TEXINPUTS ###
  76. export OTHERPATH=/usr/share/fslint/fslint
  77. export PATH=${MYPATH}:/usr/bin:/usr/sbin:${INFO_UTILS}/scripts:${OTHERPATH}:${PATH}
  78. #:${HOME}/.mozilla/native-messaging-hosts
  79. ##test go & gogs
  80. #export GOROOT=$HOME/install/local/go >> $HOME/.bashrc
  81. #export GOPATH=$HOME/install/go >> $HOME/.bashrc
  82. #export PATH=$PATH:$GOROOT/bin:$GOPATH/bin >> $HOME/.bashrc
  83. #warn the vm that xmonad is non-reparenting
  84. export _JAVA_AWT_WM_NONREPARENTING=1
  85. #export AWT_TOOLKIT=XToolkit
  86. export AWT_TOOLKIT=MToolkit
  87. #export LC_ALL="en_GB.UTF-8"
  88. #export LANG="en_GB.UTF-8"
  89. # If running interactively, then:
  90. if [ "$PS1" ]; then
  91. # don't put duplicate lines in the history. See bash(1) for more options
  92. # export HISTCONTROL=ignoredups
  93. # check the window size after each command and, if necessary,
  94. # update the values of LINES and COLUMNS.
  95. #shopt -s checkwinsize
  96. # enable color support of ls and also add handy aliases
  97. if [ "$TERM" != "dumb" ]; then
  98. eval `dircolors -b`
  99. alias ls='ls --color=auto'
  100. alias dir='ls --color=auto --format=vertical'
  101. alias vdir='ls --color=auto --format=long'
  102. fi
  103. # some more aliases
  104. alias screen='screen -U'
  105. alias lq='ls'
  106. alias ll='ls -l'
  107. alias l.='ls -a'
  108. alias lh='ls -lh'
  109. alias la='ls -A'
  110. alias lla='ls -lA'
  111. alias l='ls -CF'
  112. alias dfh='df -Ph'
  113. alias dh='du -h'
  114. alias rtfm='man'
  115. alias please='sudo'
  116. alias stxl='startx & logout'
  117. alias metapost='mpost'
  118. alias rexima="rexima -d /dev/mixer1 "
  119. alias 49.3="sudo history -p \!\!"
  120. alias ni='nice -n 19 ionice -c3'
  121. alias sl='sl -al'
  122. alias xclipass='function _xclipass(){ pass $1 | xclip -r;};_xclipass'
  123. #alias xclipass='pass $1 | xclip -r'
  124. alias gitlog='git log --stat --pretty=short --graph'
  125. #alias libreoffice='libreoffice --nosplash'
  126. #alias tuir='tuir.sh'
  127. alias open='xdg-open'
  128. #open () {
  129. # xdg-open "$@" &>/dev/null
  130. # }
  131. alias gqview='geeqie'
  132. alias vscode='code'
  133. alias mplayerhw2='mplayer -ao alsa:device=hw=2.0'
  134. alias mplayerhw3='mplayer -ao alsa:device=hw=3.0'
  135. alias valls='man'
  136. #alias gdb='gdb --tui'
  137. alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
  138. #alias :q="exit"
  139. #alias :wq="exit"
  140. alias :e="vim "
  141. alias :w="cowsay 'You are not in vim anymore.'"
  142. alias :q="cowsay 'You are not in vim anymore.'"
  143. alias :wq="cowsay 'You are not in vim anymore.'"
  144. alias :x="cowsay 'You are not in vim anymore.'"
  145. #replace nbsp by spaces
  146. bind $'"\u00a0":" "'
  147. # set a fancy prompt
  148. #PS1='\u@\h:\w\$ '
  149. #bleu \033[01;34m\]
  150. #rouge \033[01;31m\]
  151. #jaune \033[02;33m\]
  152. #vert \033[02;32m\]
  153. # ------------------------------------------------------------------- #
  154. # http://gentoo-wiki.com/TIP_Prompt_Magic #
  155. # http://www-128.ibm.com/developerworks/linux/library/l-tip-prompt/ #
  156. # ------------------------------------------------------------------- #
  157. CRESET="\[\e[0;0m\]"
  158. CRESET_BOLD="\[\e[0;1m\]"
  159. BLUE="\[\e[0;34m\]"
  160. LBLUE="\[\e[1;34m\]"
  161. RED="\[\e[0;31m\]"
  162. RED_BOLD="\[\e[1;31m\]"
  163. LRED="\[\e[1;31m\]"
  164. MAGENTA="\[\e[0;35m\]"
  165. LMAGENTA="\[\e[1;35m\]"
  166. CYAN="\[\e[0;36m\]"
  167. LCYAN="\[\e[1;36m\]"
  168. GREEN="\[\e[0;32m\]"
  169. LGREEN="\[\e[1;32m\]"
  170. YELLOW="\[\e[0;33m\]"
  171. YELLOW_BOLD="\[\e[1;33m\]"
  172. ORANGE="\[\e[0;33m\]"
  173. GREY="\[\e[0;37m\]"
  174. #prompt de couleur :' \033[01;34m\]........\033[00m\]'
  175. #CHARGE=`~/batteryCharge.sh`
  176. #old#PS1='\033[01;31m\]\u\033[00m\]\033[02;33m\]@\033[00m\]\t>\W$ '
  177. #. /home/jcb/gitbashprompt
  178. #test remplacement par gitbashprompt
  179. PS1="${RED_BOLD}\u${CRESET}${YELLOW}@${CYAN}\h${CRESET}${YELLOW}#${CRESET}\t>\W${GREEN}\$${CRESET}"
  180. # If this is an xterm set the title to user@host:dir
  181. case $TERM in
  182. xterm*)
  183. PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
  184. ;;
  185. *)
  186. ;;
  187. esac
  188. # enable programmable completion features (you don't need to enable
  189. # this, if it's already enabled in /etc/bash.bashrc).
  190. if [ -f /etc/bash_completion ]; then
  191. . /etc/bash_completion
  192. fi
  193. fi
  194. #personal patch :
  195. #http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html
  196. #if [ "$PS1" ] ; then
  197. # mkdir -m 0700 /sys/fs/cgroup/cpu/user/$$
  198. # echo $$ > /sys/fs/cgroup/cpu/user/$$/tasks
  199. #or
  200. # mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1
  201. # echo $$ > /dev/cgroup/cpu/user/$$/tasks
  202. # echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release
  203. #fi
  204. # then :
  205. #mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu
  206. #mkdir -m 0777 /sys/fs/cgroup/cpu/user
  207. export SWT_GTK3=0
  208. #pas supporté par GTK3
  209. #export GDK_NATIVE_WINDOWS=1
  210. export NO_AT_BRIDGE=1
  211. #???
  212. #export GPG_TTY=`tty`
  213. #export OCAMLPATH=${OCAMLPATH}:${HOME}/.opam
  214. #export OCAMLPATH=${OCAMLPATH}:/usr/lib64/ocaml/
  215. eval `opam config env`
  216. #echo -ne "\x1b[1 q"
  217. #printf %b '\e]12;red\a'
  218. #to make terminology work with input methods
  219. export ECORE_IMF_MODULE="xim"
  220. export XMODIFIERS="@im=none"
  221. export SCIPY_PIL_IMAGE_VIEWER=eog
  222. #feh
  223. #try to solve an xmobar/dbus problem:
  224. export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
  225. export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
  226. #try to solve anothe pb (telegram, pas d'accents, => ibus-setup)
  227. #export GTK_IM_MODULE=ibus
  228. #export XMODIFIERS=@im=ibus
  229. #export QT_IM_MODULE=ibus
  230. #???
  231. #echo "UPDATESTARTUPTTY" | gpg-connect-agent > /dev/null 2>&1
  232. #c'est censé utiliser l'accélération matérielle si possible dans Firefox
  233. #export MOZ_USE_OMTC=1
  234. #export SCIPY_PIL_IMAGE_VIEWER=display