Improve song search

This commit is contained in:
Nise Void 2020-05-15 16:15:40 +02:00
parent 28a578d280
commit 9091599124
Signed by: NiseVoid
GPG Key ID: FBA14AC83EA602F3

View File

@ -1,10 +1,10 @@
#!/bin/bash
song=$(mpc --format "%position%\t%artist%\t%title%" playlist | sort | column -s" " -t | fzf)
song=$(mpc --format "%artist%\t%title%\t%position%" playlist | sort | column -s" " -t | fzf --no-hscroll)
if [ "$song" == "" ]
then
exit
fi
mpc play $(echo $song | awk '{print $1}')
mpc play $(echo $song | awk '{print $NF}')