[download]

local/bin/player-menu

   1 #!/bin/bash
   2 
   3 player || mocp -S &
   4 s=$(player | sed 1q | cut -d ' ' -f 2-)
   5 
   6 printf '%s\n' pause play stop prev next 'seek -10' 'seek +10' |
   7 xargs -I % icon player-% % | menu -i player -p "$s" |
   8 cut -d ' ' -f 2- | xargs -r player