Advertisement
lswest

mpc-info

Jul 15th, 2011
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.17 KB | None | 0 0
  1. state=`mpc|grep "^\["|cut --delimiter=" " -f 1|sed "s/\[//"|sed "s/\]//"`
  2.  
  3. if [[ "$state" == "playing" ]]; then
  4.     echo $(mpc|head -1);
  5. else
  6.     echo "$state";
  7. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement