plsmenu (544B)
1 #!/bin/bash 2 set -euo pipefail 3 4 month=$(date "+%B" | tr '[:upper:]' '[:lower:]') 5 year=$(date "+%y") 6 month_sanitized=".${month}_${year}" 7 8 options=( 9 "$month_sanitized" 10 "infame" 11 "ambient" 12 "experimental" 13 "club" 14 "mud" 15 "weird" 16 "bass" 17 "140" 18 "match" 19 "sad" 20 "happy" 21 "screenshots" 22 ) 23 24 choice=$(printf '%s\n' "${options[@]}" | dmenu "$@") 25 26 [ -z "$choice" ] && exit 0 27 28 if [ "$choice" = "$month" ]; then 29 playlist="$current_month_playlist" 30 else 31 playlist="$choice" 32 fi 33 34 eval "$("$HOME/bin/amen-or-not")" && zsh -c "mpd_add_to_playlist '$playlist'"