28 lines
1.3 KiB
Plaintext
Raw Normal View History

2020-05-09 21:26:23 +02:00
#!/bin/sh
# asdf
2021-01-18 15:22:42 +01:00
if playerctl --player=spotify status | grep -q "Playing"; then
printf "%s" "Spotify: "
playerctl metadata --player=spotify --format "{{ artist }} - {{ title }}"
elif [ "$(mpc status | awk 'NR==2 {print $1}')" = "[playing]" ]; then
if mpc status -f "%file%" | grep -q "open.fm"; then
channel_id="$(mpc status -f "%name%" | awk 'NR==1 {print $1}')"
2021-02-18 18:46:39 +01:00
name="$(grep \""$channel_id"\" "$HOME/.config/radio/openfm_channels.json" | sed 's/: .*//g; s/ //; s/"//g' | tr -d '\n')"
printf "%s" "Open FM: $name"
title="$(mpc status -f "%title%" | awk 'NR==1' | sed 's/ w .*//g; s/& .* -/-/g; s/feat. .* -/-/g; s/REKLAMA - open.fm - REKLAMA//g')"
[ ! "$title" = "" ] && printf "%s" ": $title"
elif mpc status -f "%file%" | grep -q "http://streamer.radio.co/s93b51ccc1/listen\|rmf_maxxx\|rmf_fm"; then
mpc status -f "%name%: %title%" | awk 'NR==1' | sed 's/ w .*//g; s/& .* -/-/g; s/feat. .* -/-/g; s/ft .* -/-/g; s/; .* -/ -/g; s/ (feat. .*//g; s/feat. .*//g; s/STOP_AD_BREAK//g'
elif mpc status -f "%file%" | grep -q "zet-old.mp3"; then
mpc status -f "%name%" | awk 'NR==1'
2021-03-20 14:28:57 +01:00
elif mpc status -f "%file%" | grep -q "wow.ogg"; then
title="$(mpc status -f "%title%" | awk 'NR==1')"
printf "%s" "WOW!Radio: $title"
fi
2021-01-18 15:22:42 +01:00
elif playerctl --player=spotify status | grep -q "Paused"; then
2020-05-13 15:07:01 +02:00
echo ""
2020-05-09 21:26:23 +02:00
else
2020-05-13 15:07:01 +02:00
echo ""
2020-05-09 21:26:23 +02:00
fi