2021-10-15 11:44:15 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Select a song in the mpd queue using fzf and mpc
|
|
|
|
song_position=$(mpc -f "%position%) %artist% - %title%" playlist | \
|
|
|
|
fzf-tmux --query="$1" --reverse --select-1 --exit-0 | \
|
|
|
|
sed -n 's/^\([0-9]\+\)).*/\1/p') || return 1
|
2021-10-16 08:46:54 +00:00
|
|
|
test -n "$song_position" && mpc play $song_position
|