mirror of
https://github.com/rwxrob/dot
synced 2024-11-16 21:25:29 +00:00
17 lines
255 B
Bash
Executable File
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
|