########################################################################
# AMUSED
########################################################################

alias amused-next="_amused_cmd next"
alias amused-prev="_amused_cmd prev"
alias amused-play="_amused_cmd play"
alias amused-stop="_amused_cmd stop"
alias amused+="_amused_cmd seek +15"
alias amused-="_amused_cmd seek -15"
alias amused-jump="_amused_jump"
alias amused-shuffle="amused show | sort -R | amused load"
alias amused-sort="amused show | sort -h | amused load"

_amused_cmd() {
    . ~/.bin/_config
    amused "${@}" 2>&1 > /dev/null
    STATUS="$(amused status | head -1 | cut -d'/' -f5-)"
    NOTIFY_CMD "$STATUS"
    echo "$@: $STATUS"
}

_amused_jump() {
    S="$(echo "$(amused show |  cut -d'/' -f5-)" | sort -h | fzf -i -e)"
    [ ! -z "$S" ] \
        && _amused_cmd jump "$S"
}
