alias cls='clear && l'
alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
alias minecraft='DRI_PRIME=1 minecraft-launcher'
alias mount='udisksctl mount -b'
alias pls='sudo '
alias startgui='startx'
alias sudo='sudo '
alias tmp="cd $(mktemp -d)"
alias umnt='sudo umount /mnt -R'
alias vi="$EDITOR"
alias wconf="$EDITOR $HOME/.config/awesome"
alias zshconf="$EDITOR $ZDOTDIR/.zshrc && . $ZDOTDIR/.zshrc"

function fnalias() {
    # alias alias_cmd='cmd'
    cmd="$(alias "$2")"

    if [ -n "$cmd" ]; then
        # remove everything before and including the first =
        cmd="${cmd#*=}"
        # remove first and last char in this case, quotes
        cmd="${cmd:1:-1}"
    else
        cmd="$2"
    fi

    env "$1" "$cmd" "${@:3}"
}

alias watch='fnalias watch'
