dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

mpc-play-newest.sh (218B)


      1 #!/bin/sh
      2 mpc clear >/dev/null
      3 
      4 [ $# -gt 0 ] && n="$1" || n=20
      5 
      6 albums="$(mpc-newest.sh "$n" | sed 's/.* - //')"
      7 
      8 while read -r a; do 
      9     mpc search album "$a" | mpc insert
     10 done <<EOF
     11 $albums
     12 EOF
     13 
     14 mpc play >/dev/null