rwxrob-dot/scripts/song
Rob Muhlestein 2ea0289e9f Rebase
2022-02-09 02:29:05 -05:00

17 lines
255 B
Bash
Executable File

#!/usr/bin/env bash
function have {
which "$1" &>/dev/null
return $?
}
have chat && chat '!song'
if have spotify; then
out=$(spotify status 2>&1)
if [[ ! $out =~ Error ]]; then
echo "$out"
else
echo "Nothing playing right now"
fi
fi