From 8b9e93321bfd229b8a29fdd1fc60de670e16636d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 24 Aug 2023 21:11:27 +0200 Subject: [menuscripts] use 'commander' in menuscripts --- bin/menuscripts/mplay | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'bin/menuscripts/mplay') diff --git a/bin/menuscripts/mplay b/bin/menuscripts/mplay index 08fcc46..e4fca54 100755 --- a/bin/menuscripts/mplay +++ b/bin/menuscripts/mplay @@ -1,16 +1,6 @@ #!/bin/sh -# menu select long -if [ "$MENUCMD" = "tofi" ] -then - menucmd="tofi --width 50% --height 30% --matching-algorithm normal" -elif [ "$MENUCMD" = "dmenu" ] -then - menucmd="dmenu -l 10 -g 1 -x -i" -else - menucmd="fzf" -fi -choice="$(mpc listall | $menucmd)" -test -z "$choice" && - exit 1 -mpc insert "$choice" && - mpc next +choice="$(mpc listall | commander -c -l -d -x)" +[ "$choice" ] || exit 1 +mpc insert "$choice" || exit 1 +mpc next 2> /dev/null +mpc play 2> /dev/null -- cgit v1.2.3