From a9f3741cd0f1c01bf8f38676ae510a748eaeefba Mon Sep 17 00:00:00 2001 From: dx Date: Wed, 10 Jun 2020 01:22:52 +0100 Subject: +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 --- Scripts/.local/scripts/playlist_choice | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 Scripts/.local/scripts/playlist_choice (limited to 'Scripts') diff --git a/Scripts/.local/scripts/playlist_choice b/Scripts/.local/scripts/playlist_choice new file mode 100755 index 0000000..af69765 --- /dev/null +++ b/Scripts/.local/scripts/playlist_choice @@ -0,0 +1,10 @@ +#!/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 + -- cgit v1.2.3-13-gbd6f