zsh-config/02-aliases.zsh

29 lines
848 B
Bash
Raw Normal View History

2022-04-09 08:54:43 +00:00
# Just a funky little collection of more or less useful aliases
#Various impractical jokes and tools
if [ -n "$LOCALCITY" ]; then
alias weatherfetch="curl -sf https://wttr.in/$LOCALCITY | head -n 7 && echo ''"
fi
if [ -n "$DESKTOP_SESSION" ]; then
alias linuxver="nohup zenity --info --text=\"Linux version: \\n$(uname -srm)\" > /dev/null"
alias paste="xclip -o -selection clipboard"
alias copy="xclip -o | xclip -i -selection clipboard"
fi
alias vim="nvim"
function nojail() {
PATH=`echo $PATH | sed "s/:\/usr\/local\/bin//g" | sed "s/:\/usr\/local\/sbin//g"` $@
}
if which flashplayer > /dev/null; then
function z0rde() {
local id
id="$1"
if [ "$1" == "" ]; then
id="$((1 + $RANDOM % 8000))"
fi
echo $id
flashplayer "https://z0r.de/L/z0r-de_$id.swf"
}
fi