blob: 72ba0fb3893c57a16cf21fab0545f20628842682 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env bash
# Interactive polybar icon for music controls
# Requires cmus
if pgrep -x "cmus" > /dev/null
then
status=$( cmus-remote -Q | grep status\ | sed 's/status //' )
if [[ "$status" == *playing* ]]; then
echo -ne " %{F$(get_xres color2)} "
elif [[ "$status" == *paused* ]]; then
echo -ne " %{F$(get_xres color2)} "
elif [[ "$status" == *stopped* ]]; then
echo -ne " %{F$(get_xres color2)} "
fi
else
echo -ne " "
fi
|