From ab3309062e7c53623e0c4ad22ef0645d844ab18c Mon Sep 17 00:00:00 2001 From: davidovski Date: Fri, 22 Dec 2023 00:10:59 +0000 Subject: change mpc picker to list titles and albums --- scripts/mpc_picker | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/mpc_picker b/scripts/mpc_picker index 0e6fddc..3758b0a 100755 --- a/scripts/mpc_picker +++ b/scripts/mpc_picker @@ -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" -- cgit v1.2.1