helm/shell/mpd+ncmpcpp/bin/mpd-recent-played
2017-12-06 01:39:10 -05:00

11 lines
329 B
Bash
Executable file

#!/usr/bin/env bash
# Show a list of recently played songs, and the date they were played. Listed
# from oldest to newest. This can be used to compile a playlist, e.g.
#
# mpc clear
# mpc add $(mpc-recent-played | cut -f2)
grep played "$HOME/.config/mpd/mpd.log" | sed -r 's/ : player: played "(.+)"/\t\1/g' | tail -n${1:-20}