Files
dotfiles/Scripts/.local/scripts/playlist_choice
dx a9f3741cd0 +simple dmenu script to change music in mpd playlist
Searches playlist via dmenu for a music track then plays it. Bound to
hyper + m in sxhkd
2020-06-10 01:22:52 +01:00

11 lines
217 B
Bash
Executable File

#!/bin/bash
choice=$(mpc playlist | dmenu -i)
if [[ -n "$choice" ]]
then
item=$(echo $choice | awk '{split($0, a, "-");print a[2]}' | cut -c2-)
mpc searchplay title "$item"
else
echo "No choice given"
fi