dot/scripts/mpc_picker
2023-12-22 00:10:59 +00:00

6 lines
226 B
Bash
Executable file

#!/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"