My .*rc configuration files

.bashrc 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. source /etc/bash.bashrc
  2. export GOPATH="/home/brendan/go"
  3. export EDITOR="vim"
  4. # Path
  5. export PATH="$PATH:/usr/local/bin/matlab"
  6. export PATH="/usr/sbin:/sbin:/bin:/usr/games:$PATH"
  7. export PATH="$HOME/.cargo/bin:$PATH"
  8. export PATH="$HOME/.bin:$PATH"
  9. export PATH="$GOPATH/bin:$PATH"
  10. export PATH="$PATH:/bin"
  11. export PATH="$PATH:/home/brendan/.gem/ruby/2.5.0/bin"
  12. # Shortcuts
  13. alias matlab="/usr/local/bin/matlab/matlab"
  14. alias spaces2tab='grep -Er "*+" --exclude-dir={.git,node_modules,vendor} --exclude="*.yml" --exclude="*.md" --exclude=".gitignore" | grep ":" | cut -d":" -f1 | sort -u | xargs sed -Ei "s/^ /\t/"'
  15. alias vpn='sudo openvpn --config ~/Documents/ccrypto-nl-tcp.ovpn.ovpn'
  16. alias pitivi='optirun flatpak run org.pitivi.Pitivi//stable'
  17. alias ffupdate='pacaur -S --noconfirm --noedit firefox-always-nightly'
  18. alias update='yaourt -Syua --noconfirm --ignore java-testng --ignore javahelp2 --ignore jgraphx --ignore scilab --ignore firefox-always-nightly --ignore postgresql --ignore postgresql-libs'
  19. alias backuphome='rsync --links --recursive --progress --exclude=".cache" $HOME/*'
  20. alias new-gb-project='mkdir src vendor bin pkg && git init && echo -e "bin\npkg" > .gitignore'
  21. alias gocode-lookup='gocode set package-lookup-mode'
  22. alias l='ls'
  23. alias ll='ls -l'
  24. alias lll='ls -lisha'
  25. alias la='ls -a'
  26. alias ga='git add'
  27. alias gs='git status'
  28. alias gd='git diff'
  29. alias gc='git commit'
  30. alias gr='git rm'
  31. alias gco='git checkout'
  32. alias gl="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"
  33. alias gps='git push'
  34. alias gpl='git pull'
  35. alias s='sudo systemctl'
  36. alias log='sudo journalctl -u'
  37. alias logf='sudo journalctl -fu'
  38. #source /usr/share/nvm/init-nvm.sh
  39. alias nv7="nvm use --delete-prefix v7.10"
  40. # Matrix
  41. alias goneb="cd ~/Documents/matrix/go-neb && BIND_ADDRESS=:4050 BASE_URL=http://localhost:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 bin/go-neb"
  42. ## Dendrite
  43. alias kafstart="/home/brendan/Documents/matrix/dendrite/kafka/bin/kafka-server-start.sh -daemon /home/brendan/Documents/matrix/dendrite/kafka/config/server.properties"
  44. alias denproxy='./bin/client-api-proxy \
  45. --bind-address ":8448" \
  46. --sync-api-server-url "http://localhost:7773" \
  47. --client-api-server-url "http://localhost:7771" \
  48. --media-api-server-url "http://localhost:7774" \
  49. --public-rooms-api-server-url "http://localhost:7775" \
  50. --tls-cert _test/federation_cert.pem \
  51. --tls-key _test/federation_key.pem'
  52. alias denmono='./bin/dendrite-monolith-server \
  53. --tls-cert "_test/federation_cert.pem" \
  54. --tls-key "_test/federation_key.pem"'
  55. ## Additional scripts (eg completion)
  56. for f in ~/.local/share/bash/*; do source $f; done
  57. # ROS
  58. if [[ -f /opt/ros/kinetic/setup.bash ]]; then
  59. source /opt/ros/kinetic/setup.bash
  60. source ~/catkin_ws/devel/setup.bash
  61. fi
  62. # Prompt
  63. function parse_git_dirty {
  64. [[ $(git status 2> /dev/null | tail -n1) != "rien à valider, la copie de travail est propre" ]] && echo "*"
  65. }
  66. function parse_git_branch {
  67. git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\(\1$(parse_git_dirty)\)/"
  68. }
  69. COLOR_NONE='\[\e[00m\]'
  70. COLOR_LCYAN='\[\e[01;36m\]'
  71. COLOR_LYELLOW='\[\e[01;33m\]'
  72. COLOR_LMAGENTA='\[\e[01;35m\]'
  73. COLOR_LGRAY='\[\e[01;37m\]'
  74. PS1="${COLOR_LGRAY}[\t] ${COLOR_LCYAN}\u@\H${COLOR_NONE}:${COLOR_LMAGENTA}\w${COLOR_NONE} ${COLOR_LYELLOW}\$(parse_git_branch)${COLOR_NONE}$ "
  75. # Tilix VTE stuff
  76. if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
  77. source /etc/profile.d/vte.sh
  78. fi
  79. eval "$(direnv hook bash)"