Fix i3blocks/mpd
This commit is contained in:
parent
61465dc45a
commit
4802bb7b4d
1 changed files with 15 additions and 8 deletions
|
@ -56,14 +56,21 @@ do
|
||||||
read -t 1 BLOCK_BUTTON
|
read -t 1 BLOCK_BUTTON
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
1|3) [[ "${o["state"]}" == stop ]] \
|
1|3)
|
||||||
&& echo "play" >&${IN} \
|
if [[ "${o["state"]}" == stop ]]
|
||||||
&& sed '/^OK$/q' <&$OUT &>/dev/null \
|
then
|
||||||
|| self-reset ;;&
|
echo "play" >&${IN} || self-reset
|
||||||
2) [[ "${o["state"]}" == stop ]] \
|
sed '/^OK$/q' <&$OUT &>/dev/null
|
||||||
&& echo "play" >&${IN} \
|
fi
|
||||||
|| echo "pause" >&${IN} \
|
;;
|
||||||
|| self-reset ;;&
|
2)
|
||||||
|
if [[ "${o["state"]}" == stop ]]
|
||||||
|
then
|
||||||
|
echo "play" >&${IN} || self-reset
|
||||||
|
else
|
||||||
|
echo "pause" >&${IN} || self-reset
|
||||||
|
fi
|
||||||
|
;;
|
||||||
1) echo "previous" >&${IN} || self-reset ;;&
|
1) echo "previous" >&${IN} || self-reset ;;&
|
||||||
3) echo "next" >&${IN} || self-reset ;;&
|
3) echo "next" >&${IN} || self-reset ;;&
|
||||||
1|2|3) sed '/^OK$/q' <&$OUT &>/dev/null ;;
|
1|2|3) sed '/^OK$/q' <&$OUT &>/dev/null ;;
|
||||||
|
|
Loading…
Reference in a new issue