#!/usr/bin/env zsh # Replacement programs typeset -A repaliases=( #alias replacement htop htim mutt neomutt vim nvim sudo "${SUDO:- }" neofetch fastfetch ) for alias rep in ${(kv)repaliases}; do command -v $rep >/dev/null && alias $alias=$rep done # Tests if replacement exists before creating alias # Shorten program names alias \ open="xdg-open" \ smci="sudo make clean install" \ smi="sudo make install" \ su="sudo su -l" \ serve="python3 -m http.server" \ # Power scripts alias \ halt="launch shutdown" \ off="launch shutdown" \ reboot="launch reboot" \ zzz="launch suspend" \ # Colorize command output alias \ bat="bat --theme='Monokai Extended'" \ diff="diff --color=auto" \ exa="exa --icons -a --group-directories-first" \ grep="grep --color=auto -I --ignore-case --line-number" \ ip="ip --color=auto" \ ls="ls -vAhN --color=auto --group-directories-first" \ # (Non)-Verbosity alias \ cp="cp -iv" \ dd="sudo dd status=progress bs=4M" ffmpeg="ffmpeg -hide_banner" \ ffprobe="ffprobe -hide_banner" \ mkd="mkdir -p" \ mv="mv -iv" \ rm="rm -v" \ # Miscellaneous alias \ yt-dlp-album="yt-dlp -x -o '%(uploader)s (%(upload_date>%Y)s) - %(playlist_title)s%%%(playlist_index)s - %(title)s.%(ext)s'" \ yt-dlp="yt-dlp -o '%(uploader)s - %(title)s.%(ext)s'" \ # Clean home directory alias \ mbsync="mbsync --config $MBSYNCRC" \ startx="startx $X11CONFIG/xinitrc" \ # Copy-pasting from internet alias \ \$="" \ \#="${SUDO-sudo}" \