change mpc picker to list titles and albums

This commit is contained in:
davidovski 2023-12-22 00:10:59 +00:00
parent 7b3aa701e2
commit ab3309062e
3 changed files with 7 additions and 5 deletions

View file

@ -1,4 +1,6 @@
#!/bin/sh
chosen=$(mpc listall | dmenu -i -p mpd)
[ "$chosen" != "" ] || exit
mpc insert "$chosen"
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"