From 2dc486fb891e65658dff83ab34ca8878756a6a90 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Fri, 18 Oct 2024 21:52:28 -0500 Subject: initial commit --- zscripts/aliasrc.zsh | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 zscripts/aliasrc.zsh (limited to 'zscripts/aliasrc.zsh') diff --git a/zscripts/aliasrc.zsh b/zscripts/aliasrc.zsh new file mode 100755 index 0000000..f4e5035 --- /dev/null +++ b/zscripts/aliasrc.zsh @@ -0,0 +1,64 @@ +#!/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" \ + +# 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}" \ + -- cgit v1.2.3