#!/bin/sh

# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# Verbosity and settings that you pretty much just always are going to want.
alias \
	mv="mv -iv" \
	rm="rm -vI" \
	mkd="mkdir -pv" \
	yt="youtube-dl --add-metadata -i" \
	yta="yt -x -f bestaudio/best" \
	ffmpeg="ffmpeg -hide_banner" \
	cp="cp -iv" \

# Colorize commands when possible.
alias \
	ls="ls -hN --color=auto --group-directories-first" \
	grep="grep --color=auto" \
	diff="diff --color=auto" \
	ccat="highlight --out-format=ansi"

# These common commands are just too long! Abbreviate them.
alias \
	ka="killall" \
	g="git" \
	trem="transmission-remote" \
	YT="pipe-viewer" \
	sdn="doas shutdown -h now" \
	f="$FILE" \
	e="$EDITOR" \
	v="$EDITOR" \
	pac="doas pacman" \
	pu="doas pacman -Syu" \
	yu="yay -Syu --aur" \
	xi="doas xbps-install" \
	xr="doas xbps-remove -R" \
	xq="xbps-query" \
	z="zathura"

alias \
	ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
	weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
	tmux="tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" \
	scrcpy="scrcpy --shortcut-mod=lctrl" \
	ixpe="cd $HOME/IXPE_analysis/Code && clear && ls" \
	foc="cd $HOME/FOC_reduction/Code && clear && ls" \
    config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=/home/tibeuleu" \
	hlup="wg-quick up artixbook" \
	hldown="wg-quick down artixbook"
