########### # Aliases # ########### # 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 lh='ls -trhgGN --color=always | cut -d" " -f3-' # List files in chronological order alias diff='diff --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' alias cal='cal -m -3' else alias ls='ls -FGh' alias ipa='ip address' alias ipa='ip route' fi if which sl > /dev/null 2>&1; then alias l='sl' alias lll='sl' fi if which nvim > /dev/null 2>&1; then alias vim='nvim' fi if [ -f "$HOME/howto/how_to" ]; then alias howto="vim $HOME/howto/how_to" fi case $(uname -s) in Arch) alias redwm='cd ~/aur/dwm-git; updpkgsums; makepkg -fi --noconfirm; killall dwm' 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';; Darwin) if which mvim > /dev/null 2>&1; then alias vim='mvim -v' fi;; esac alias ll='ls -lha' alias df='df -h' alias diff='diff -u' 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