Files
dotfiles/.bash_aliases
2020-07-06 18:00:10 +02:00

24 lines
1.2 KiB
Bash

alias update='yay -Pw && yay -Sc && yay -Syu --sudoloop && yay -c && sudo pacdiff'
alias gemocstudio='PATH=/usr/lib/jvm/java-9-jdk/bin/:$PATH ~/gemoc/GemocStudio'
alias sl='ls'
alias ls='ls --color=auto'
alias cat='ccat -G Keyword="*glay*" -G Decimal="glay" -G Plaintext="glay" --bg=dark'
alias youtube='URL=https://www.youtube.com/watch\?v\=Mvvsa5HAJiI\&list\=RDMM\&start_radio\=1 && PLAYLIST="" && for i in {1..30} ; do URL="https://www.youtube.com"`curl -s -b ~/.config/youtube-dl/youtube.txt $URL | grep "next-playlist-list-item" | sed '\''s/.*href=\"//'\'' | sed '\''s/\".*//'\'' | sed '\''s/\&/\&/g'\''` ; PLAYLIST="$PLAYLIST\n`echo $URL | sed '\''s/\&list.*//'\''`" ; done ; echo "$PLAYLIST" | mpv --playlist=-'
function javaversion() {
if [ "$#" -ne 1 ]; then
echo "Expected parameter <java_version>"
else
if [ "$1" -eq 8 ]; then
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
elif [ "$1" -eq 9 ]; then
export JAVA_HOME=/usr/lib/jvm/java-9-jdk
elif [ "$1" -eq 10 ]; then
export JAVA_HOME=/usr/lib/jvm/java-10-openjdk
elif [ "$1" -eq 11 ]; then
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
fi
export PATH=$JAVA_HOME/bin:$PATH
fi
}