rc/aliases

70 lines
2.3 KiB
Text
Raw Permalink 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'
2022-10-01 10:07:10 +00:00
alias lh='ls -trhgGN --color=always | cut -d" " -f3-' # List files in chronological order
2020-07-27 17:56:38 +00:00
alias diff='diff --color'
2020-01-20 02:34:03 +00:00
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'
2021-08-27 18:37:30 +00:00
alias cal='cal -m -3'
2020-01-20 02:34:03 +00:00
else
2020-07-27 17:56:38 +00:00
alias ls='ls -FGh'
2020-01-20 02:34:03 +00:00
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-11-20 18:07:46 +00:00
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
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'
2020-07-27 17:56:38 +00:00
alias diff='diff -u'
2020-01-20 02:34:03 +00:00
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 &"
2024-03-18 22:18:01 +00:00
alias minecraft='prismlauncher'
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