diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-24 21:11:27 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-24 21:11:27 +0200 |
commit | 8b9e93321bfd229b8a29fdd1fc60de670e16636d (patch) | |
tree | 60963be78e9bca76d996be3de468fc4e03deb137 /bin/menuscripts/mplay | |
parent | 067b271a243dafcf652fe7cfe85e723d25ff1a64 (diff) |
[menuscripts] use 'commander' in menuscripts
Diffstat (limited to 'bin/menuscripts/mplay')
-rwxr-xr-x | bin/menuscripts/mplay | 20 |
1 files changed, 5 insertions, 15 deletions
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 |