#!/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