diff --git a/.zshrc b/.zshrc index 7af698e..f328552 100644 --- a/.zshrc +++ b/.zshrc @@ -65,3 +65,32 @@ source $HOME/.config/base16-shell/scripts/base16-default-dark.sh #bindkey "${terminfo[khome]}" beginning-of-line #bindkey "${terminfo[kend]}" end-of-line export TERMCMD=termite + + +function auradd { + pkg=$1 + aur sync --no-view --no-confirm --database custom "$pkg" >&2 + sudo pacman -Sy "$pkg" +} + +function aurrm { + pkg=$1 + rm_out=$(repo-remove /var/cache/pacman/custom/custom.db.tar "$pkg" 2>&1) + if [[ $rm_out = *"ERROR"* ]]; then + echo "not found" >&2 + else + rm -rf /var/cache/pacman/custom/"$pkg"*.pkg.* || true + echo "$pkg removed" + fi + sudo pacman -Sy + sudo pacman -Rnc "$pkg" +} + +function aurupdate { + aur sync --no-view --no-confirm --database custom -u + sudo pacman -Syu +} + +function aurls { + sudo pacman -Sl custom +}