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'
|
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
|
2020-12-23 16:10:05 +00:00
|
|
|
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
|
2018-02-26 08:18:40 +00:00
|
|
|
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'"
|
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 &"
|
2024-03-18 22:18:01 +00:00
|
|
|
alias minecraft='prismlauncher'
|
2018-02-26 08:18:40 +00:00
|
|
|
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
|