blob: a2a7530471879147a50dbf45159e3c9ce5606a35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/bash
mpd_playing=$(mpc 2>/dev/null | grep "\[playing\]")
spotify_playing=$($DOTFILES_LOCATION/scripts/media_is_spotify_playing.sh)
if [[ $spotify_playing == "true" ]]
then
if [[ $mpd_playing != "" ]]
then
echo spotify and mpd playing
else
pb_status=""
if [[ $metadata == *"spotify:ad"* ]]
then
echo "Spotify: ad :/"
else
echo Spotify: "▶" $($DOTFILES_LOCATION/scripts/media_print_spotify_info.sh)
fi
fi
elif [[ $mpd_playing != "" ]]
then
if type mpc &>/dev/null
then
echo MPD: "▶" $(mpc current)
else
echo "for mpd status mpc is needed"
fi
elif pgrep spotify &>/dev/null
then
echo Spotify: "▐▐" $($DOTFILES_LOCATION/scripts/media_print_spotify_info.sh)
elif pgrep mpd &>/dev/null
then
if type mpc &>/dev/null
then
echo MPD: "▐▐" $(mpc current)
else
echo "for mpd status mpc is needed"
fi
else
echo no music
fi
|