dot/scripts/mpc_picker

7 lines
226 B
Text
Raw Normal View History

2021-10-09 21:20:41 +00:00
#!/bin/sh
selected=$(mpc -f "%title%[\t\t%artist%][\t\t%album%]\t\t%file%" listall | dmenu -i -p mpd)
[ "$selected" == "" ] && exit
file=$(printf "%s\n" "$selected" | rev | cut -f1 -d' ' | rev)
echo "$file"
mpc insert "$file"