2018-02-26 08:18:40 +00:00
|
|
|
###########
|
|
|
|
# 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
|
2018-02-26 08:18:40 +00:00
|
|
|
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'"
|
2018-02-26 08:18:40 +00:00
|
|
|
alias which='which -a'
|
2019-11-18 18:49:44 +00:00
|
|
|
# The infamous cd ...etc
|
2018-02-26 08:18:40 +00:00
|
|
|
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]'"
|
2018-03-19 18:48:46 +00:00
|
|
|
alias shuffle='mpv --shuffle --display-tags= --no-audio-display'
|
2018-02-26 08:18:40 +00:00
|
|
|
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'
|
2018-05-27 18:48:01 +00:00
|
|
|
alias ytmp3='youtube-dl -x --audio-format mp3 --no-playlist -o "%(title)s.%(ext)s" "$(xsel -ob)"'
|
2019-11-18 18:49:44 +00:00
|
|
|
# Fix for archlinux
|
2018-02-26 08:18:40 +00:00
|
|
|
alias zbarcam='LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so zbarcam'
|
|
|
|
|
|
|
|
# vim: ft=zsh
|