rc/aliases

60 lines
2.1 KiB
Text
Raw Normal View History

###########
# Aliases #
###########
2020-01-20 02:34:03 +00:00
# Detect if we have GNU coreutils or BSD
if date --version > /dev/null 2>&1 ;then
alias ls='ls --classify --tabsize=0 --literal --color=auto --show-control-chars -h'
alias diff='diff -u --color'
alias less='less --quiet'
alias grep="grep --color"
alias rm='rm -I'
alias ip='ip --color'
alias ipa='ip route && echo && ip --brief address'
alias ipr='ip --brief address && echo && ip route'
else
alias ipa='ip address'
alias ipa='ip route'
fi
if which sl > /dev/null 2>&1; then
alias l='sl'
alias lll='sl'
fi
2020-02-19 17:14:43 +00:00
case $(uname -s) in
2020-01-20 02:34:03 +00:00
Arch)
2020-02-19 17:14:43 +00:00
alias redwm='cd ~/aur/dwm-git; updpkgsums; makepkg -fi --noconfirm; killall dwm'
2020-01-20 02:34:03 +00:00
alias upgrade='sudo pacman -Syu';;
Debian|Ubuntu)
alias upgrade='sudo apt-get update && sudo apt-get -dy dist-upgrade && sudo apt-get dist-upgrade';;
VoidLinux)
alias upgrade='sudo xbps-install -Su';;
2020-02-19 17:14:43 +00:00
Darwin)
if which mvim > /dev/null 2>&1; then
alias vim='mvim -v'
fi;;
2020-01-20 02:34:03 +00:00
esac
alias ll='ls -lha'
2020-01-20 02:34:03 +00:00
alias df='df -h'
alias du='du -h'
alias feh="feh -. --auto-rotate --action1 'dragon -x %F'"
alias which='which -a'
# The infamous cd ...etc
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
alias -g ......='../../../../..'
alias -g .......='../../../../../..'
alias -g ........='../../../../../../..'
# Hackish tweaks
alias steam-wine="WINEDEBUG=-all wine $WINEPREFIX/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite -no-cef-sandbox &"
alias minecraft='java -jar $HOME/.minecraft/launcher.jar'
alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"
alias shuffle='mpv --shuffle --display-tags= --no-audio-display'
alias steam="LD_PRELOAD='/usr/\$LIB/libstdc++.so.6 /usr/\$LIB/libgcc_s.so.1 /usr/\$LIB/libxcb.so.1 /usr/\$LIB/libgpg-error.so' /usr/bin/steam"
alias surftor='http_proxy=socks5://127.0.0.1:9050/ surf'
alias ytmp3='youtube-dl -x --audio-format mp3 --no-playlist -o "%(title)s.%(ext)s" "$(xsel -ob)"'
# Fix for archlinux
alias zbarcam='LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so zbarcam'
# vim: ft=zsh