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