Update nowplaying
Now only displays info for the running music player. Works on Artix MATE with qt5-tools installed. Added a few more Spotify filters.
This commit is contained in:
parent
7bd9c495fd
commit
5eb88964df
21
nowplaying
21
nowplaying
|
@ -1,15 +1,28 @@
|
||||||
|
GNU nano 6.1 /home/ktn/.local/bin/nowplaying
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SONG=$( cat ~/.nowplaying2.tmp )
|
SONG=$( cat ~/.nowplaying2.tmp )
|
||||||
#while :; do
|
#while :; do
|
||||||
|
|
||||||
if ! $(pgrep -x "spotify" >/dev/null) ; then
|
if ! $(pgrep -x "spotify" >/dev/null) ; then
|
||||||
tail -z ~/.cmus/now-playing & echo -n $(np -n 2>/dev/null);
|
if ! $(pgrep -x "cmus" >/dev/null) && $(pgrep -x "clementine" >/dev/null); then
|
||||||
|
echo -n $(np -n 2>/dev/null)
|
||||||
|
echo -n "spotify is off as fuck" > ~/.nowplaying2.tmp
|
||||||
#echo "error1";
|
#echo "error1";
|
||||||
|
elif ! $(pgrep -x "clementine" >/dev/null) && $(pgrep -x "cmus" >/dev/null); then
|
||||||
|
tail -z ~/.cmus/now-playing
|
||||||
|
echo -n "spotify is off as fuck" > ~/.nowplaying2.tmp
|
||||||
|
else
|
||||||
|
tail -z ~/.cmus/now-playing & echo -n $(np -n 2>/dev/null);
|
||||||
|
echo -n "spotify is off as fuck" > ~/.nowplaying2.tmp
|
||||||
|
fi
|
||||||
elif $(pidof -x "spotify">/dev/null ) ; then
|
elif $(pidof -x "spotify">/dev/null ) ; then
|
||||||
|
# echo -n $( spotifycli --status ) > ~/.nowplaying2.tmp ;
|
||||||
|
echo $( spotifycli --status ) > ~/.nowplaying2.tmp ;
|
||||||
|
|
||||||
case $SONG in
|
case $SONG in
|
||||||
"Advertisement" )
|
"-" | "- Shop DGDG.com" | "- Advertisement" | "Advertisement" )
|
||||||
tail -z ~/.cmus/now-playing & echo -n $(np -n 2>/dev/null);
|
tail -z ~/.cmus/now-playing & echo -n $(np -n 2>/dev/null);
|
||||||
echo 'MUTED·'
|
echo 'AD MUTED·' ; #&& echo 'AD MUTED·' > ~/.nowplaying2.tmp
|
||||||
#echo "error2";
|
#echo "error2";
|
||||||
;;
|
;;
|
||||||
"spotify is off as fuck" )
|
"spotify is off as fuck" )
|
||||||
|
@ -22,5 +35,7 @@ elif $(pidof -x "spotify">/dev/null ) ; then
|
||||||
#echo "error4";
|
#echo "error4";
|
||||||
;;
|
;;
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
|
echo -n $( spotifycli --status ) > ~/.nowplaying2.tmp ;
|
||||||
fi
|
fi
|
||||||
#sleep 2; done
|
#sleep 2; done
|
||||||
|
|
Loading…
Reference in a new issue