config: adjust scripts & configure rustup and cargo

This commit is contained in:
xeruf 2021-10-08 11:05:58 +00:00
parent 823a18ce2e
commit 526346538b
4 changed files with 24 additions and 20 deletions

View File

@ -130,14 +130,20 @@ alias jcj='jcl -o json-pretty -u'
# Applications {{{1 # Applications {{{1
# Remote alias u='topgrade'
alias delta="sc restart openvpn-client@deltaPeak.service" alias expr='noglob expr'
alias sshl="lemonade server -allow 127.0.0.1 & ssh -R 2489:127.0.0.1:2489"
alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G'
alias lar='last | tac'
alias calc='rlwrap -a bc -l' alias calc='rlwrap -a bc -l'
alias logoff="loginctl terminate-user $USER" alias logoff="loginctl terminate-user $USER"
blues() { bluedevil-sendfile $(echo "$@" | xargs -n 1 realpath | xargs -n 1 echo -n " --files") } blues() { bluedevil-sendfile $(echo "$@" | xargs -n 1 realpath | xargs -n 1 echo -n " --files") }
# Remote
alias delta="sc restart openvpn-client@deltaPeak.service"
alias sshl="lemonade server -allow 127.0.0.1 & ssh -R 2489:127.0.0.1:2489"
# locate roughly # locate roughly
loci() { locate --all --ignore-case --basename --existing "$@" | command grep --extended-regexp --ignore-case --color=always $(echo "$|${@:$#}" | sed 's/ /|/g') | less -F } loci() { locate --all --ignore-case --basename --existing "$@" | command grep --extended-regexp --ignore-case --color=always $(echo "$|${@:$#}" | sed 's/ /|/g') | less -F }
alias loc='noglob loci' alias loc='noglob loci'
@ -148,11 +154,6 @@ alias loce='noglob locei'
# locate all # locate all
alias loca='noglob sudo updatedb --prunenames "" /var/lib/mlocate/all.db && loci --database ""' alias loca='noglob sudo updatedb --prunenames "" /var/lib/mlocate/all.db && loci --database ""'
alias expr='noglob expr'
alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G'
alias lar='last | tac'
# Listen to loopback of mic # Listen to loopback of mic
alias listen='pactl load-module module-loopback; echo "Press Enter to stop"; read; pactl unload-module module-loopback' alias listen='pactl load-module module-loopback; echo "Press Enter to stop"; read; pactl unload-module module-loopback'
@ -186,16 +187,9 @@ alias dic="cat $XDG_DATA_HOME/dictcc/dict.txt | tail -n +16 |
fzf --tiebreak=length --bind='alt-bspace:clear-query'" fzf --tiebreak=length --bind='alt-bspace:clear-query'"
alias dict="rlwrap rdictcc -d $XDG_DATA_HOME/dictcc" alias dict="rlwrap rdictcc -d $XDG_DATA_HOME/dictcc"
alias dictu="dict -i $XDG_DATA_HOME/dictcc/dict.txt" alias dictu="dict -i $XDG_DATA_HOME/dictcc/dict.txt"
alias startMinecraftServer='curl https://ipinfo.io/ip | xclip -sel clip && cd ~/daten/games/sharedgames/minecraft/server && java -jar forge-1.12.2-14.23.5.2768-universal.jar -mx 8G' alias startMinecraftServer='curl https://ipinfo.io/ip | xclip -sel clip && cd ~/daten/games/sharedgames/minecraft/server && java -jar forge-1.12.2-14.23.5.2768-universal.jar -mx 8G'
alias u='topgrade'
alias j='jrnl'
jn() { jrnl -to today "$@" | less +G }
compdef jn=jrnl
alias jnc='jn -contains'
alias jne='jrnl --edit'
npm-reinstall() { npm-reinstall() {
rm -rf $TMPDIR/react-* rm -rf $TMPDIR/react-*
rm -rf node_modules/ rm -rf node_modules/

View File

@ -9,6 +9,15 @@ xo() {
done done
} }
if which jrnl >/dev/null; then
alias j='jrnl'
jn() { jrnl -to today "$@" | less +G }
compdef jn=jrnl
alias jnc='jn -contains'
alias jne='jrnl --edit'
fi
test "$DISPLAY" || return 0 test "$DISPLAY" || return 0
alias graphics='lspci -vnn | grep VGA --color=never && xrandr --listproviders' alias graphics='lspci -vnn | grep VGA --color=never && xrandr --listproviders'

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
# [c]at the given files as prettified [j]son # [c]at the given files as prettified [j]son
cat "$@" | while read -r line; do echo -n "$line" | python -m json.tool 2>/dev/null; done | bat --language json --style numbers cat "$@" | while read -r line; do echo -n "$line" | python3 -m json.tool; done | bat --language json --style numbers

View File

@ -14,6 +14,7 @@ export GNUPGHOME="$XDG_DATA_HOME"/gnupg
export KDEHOME="$XDG_STATE_HOME"/kdehome export KDEHOME="$XDG_STATE_HOME"/kdehome
export GOPATH="$XDG_STATE_HOME"/go export GOPATH="$XDG_STATE_HOME"/go
export CARGO_HOME="$XDG_DATA_HOME"/cargo export CARGO_HOME="$XDG_DATA_HOME"/cargo
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
export RLWRAP_HOME="$XDG_STATE_HOME"/rlwrap export RLWRAP_HOME="$XDG_STATE_HOME"/rlwrap
@ -32,8 +33,8 @@ export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
export GRADLE_USER_HOME="$XDG_STATE_HOME"/gradle export GRADLE_USER_HOME="$XDG_STATE_HOME"/gradle
export ANDROID_PREFS_ROOT="$XDG_CONFIG_HOME"/android export ANDROID_PREFS_ROOT="$XDG_CONFIG_HOME"/android
export ANDROID_EMULATOR_HOME="$XDG_STATE_HOME"/android/emulator export ANDROID_EMULATOR_HOME="$XDG_STATE_HOME"/android/emulator
export ANDROID_SDK_ROOT="/opt/android/sdk" export ANDROID_SDK_ROOT="/opt/android-sdk"
export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools" export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin"
# taskwarrior & timewarrior # taskwarrior & timewarrior
export TIMEWARRIORDB="$XDG_DATA_HOME/timewarrior" export TIMEWARRIORDB="$XDG_DATA_HOME/timewarrior"
export TASKRC="$XDG_CONFIG_HOME/task/taskrc" export TASKRC="$XDG_CONFIG_HOME/task/taskrc"