Set "auto" as default behaviour if not argument

This commit is contained in:
gardouille 2022-05-25 10:30:02 +02:00
parent acf38e3026
commit c71d322eee
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

View File

@ -336,8 +336,16 @@ case $1 in
;;
*)
echo "Usage: rofi-mpd [OPTION]"
echo "Try 'rofi-mpd --help' for more information."
## Apply auto option by default
CHOICE=$(echo -e "By Artist\nBy Album\nBy Track\nBy Now\nJump\nShuffle\nControl"| $ROFI);
if [ "$CHOICE" = "By Artist" ]; then search_by_artist; fi
if [ "$CHOICE" = "By Album" ]; then search_by_album; fi
if [ "$CHOICE" = "By Track" ]; then search_by_track; fi
if [ "$CHOICE" = "By Now" ]; then search_by_track_play_now; fi
if [ "$CHOICE" = "Jump" ]; then jump_to_song; fi
if [ "$CHOICE" = "Shuffle" ]; then shuffle; fi
if [ "$CHOICE" = "Control" ]; then control; fi
exit
;;
esac