Brendan Abolivier 6 lat temu
rodzic
commit
707b7cd7a7
Podpisane przez: Brendan Abolivier <contact@brendanabolivier.com> ID klucza GPG: 8EF1500759F70623
1 zmienionych plików z 94 dodań i 0 usunięć
  1. 94
    0
      .bashrc

+ 94
- 0
.bashrc Wyświetl plik

@@ -0,0 +1,94 @@
1
+eval "$(direnv hook bash)"
2
+source /etc/bash.bashrc
3
+
4
+export GOPATH="/home/brendan/go"
5
+export EDITOR="vim"
6
+
7
+# Path
8
+
9
+export PATH="$PATH:/usr/local/bin/matlab"
10
+export PATH="/usr/sbin:/sbin:/bin:/usr/games:$PATH"
11
+export PATH="$HOME/.cargo/bin:$PATH"
12
+export PATH="$HOME/.bin:$PATH"
13
+export PATH="/home/brendan/.gem/ruby/2.4.0/bin:$PATH"
14
+export PATH="$GOPATH/bin:$PATH"
15
+export PATH="$PATH:/bin"
16
+
17
+# Shortcuts
18
+
19
+alias matlab="/usr/local/bin/matlab/matlab"
20
+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/"'
21
+alias vpn='sudo openvpn --config ~/Documents/ccrypto-nl-tcp.ovpn.ovpn'
22
+alias pitivi='optirun flatpak run org.pitivi.Pitivi//stable'
23
+alias ffupdate='pacaur -S --noconfirm --noedit firefox-always-nightly'
24
+alias update='yaourt -Syua --noconfirm --ignore java-testng --ignore javahelp2 --ignore jgraphx --ignore scilab --ignore firefox-always-nightly --ignore postgresql --ignore postgresql-libs'
25
+alias backuphome='rsync --links --recursive --progress --exclude=".cache" $HOME/*'
26
+alias new-gb-project='mkdir src vendor bin pkg && git init && echo -e "bin\npkg" > .gitignore'
27
+alias gocode-lookup='gocode set package-lookup-mode'
28
+
29
+alias l='ls'
30
+alias ll='ls -l'
31
+alias lll='ls -lisha'
32
+alias la='ls -a'
33
+alias ga='git add'
34
+alias gs='git status'
35
+alias gd='git status'
36
+alias gc='git commit'
37
+alias gr='git rm'
38
+alias gco='git checkout'
39
+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"
40
+alias s='sudo systemctl'
41
+alias log='sudo journalctl -u'
42
+alias logf='sudo journalctl -fu'
43
+
44
+#source /usr/share/nvm/init-nvm.sh
45
+alias nv7="nvm use --delete-prefix v7.10"
46
+
47
+# Matrix
48
+
49
+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"
50
+
51
+## Dendrite
52
+
53
+alias kafstart="/home/brendan/Documents/matrix/dendrite/kafka/bin/kafka-server-start.sh -daemon /home/brendan/Documents/matrix/dendrite/kafka/config/server.properties"
54
+alias denproxy='./bin/client-api-proxy \
55
+--bind-address ":8448" \
56
+--sync-api-server-url "http://localhost:7773" \
57
+--client-api-server-url "http://localhost:7771" \
58
+--media-api-server-url "http://localhost:7774" \
59
+--public-rooms-api-server-url "http://localhost:7775" \
60
+--tls-cert _test/federation_cert.pem \
61
+--tls-key _test/federation_key.pem'
62
+alias denmono='./bin/dendrite-monolith-server \
63
+ --tls-cert "_test/federation_cert.pem" \
64
+ --tls-key "_test/federation_key.pem"'
65
+
66
+## Additional scripts (eg completion)
67
+for f in ~/.local/share/bash/*; do source $f; done
68
+
69
+# ROS
70
+if [[ -f /opt/ros/kinetic/setup.bash ]]; then
71
+	source /opt/ros/kinetic/setup.bash
72
+	source ~/catkin_ws/devel/setup.bash
73
+fi
74
+
75
+# Prompt
76
+function parse_git_dirty {
77
+ [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo "*"
78
+}
79
+function parse_git_branch {
80
+ git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\(\1$(parse_git_dirty)\)/"
81
+}
82
+
83
+COLOR_NONE='\[\e[00m\]'
84
+COLOR_LCYAN='\[\e[01;36m\]'
85
+COLOR_LYELLOW='\[\e[01;33m\]'
86
+COLOR_LMAGENTA='\[\e[01;35m\]'
87
+COLOR_LGRAY='\[\e[01;37m\]'
88
+
89
+PS1="${COLOR_LGRAY}[\t] ${COLOR_LCYAN}\u@\H${COLOR_NONE}:${COLOR_LMAGENTA}\w${COLOR_NONE} ${COLOR_LYELLOW}\$(parse_git_branch)${COLOR_NONE}$ "
90
+
91
+# Tilix VTE stuff
92
+if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
93
+	source /etc/profile.d/vte.sh
94
+fi