playhere (427B)
1 #!/usr/bin/env bash 2 if ! command -v mpv &>/dev/null; then 3 echo "mpv not installed." >&2 4 exit 1 5 fi 6 if ! command -v terminal-notifier &>/dev/null; then 7 echo "terminal-notifier not installed." >&2 8 exit 1 9 fi 10 [ $# -gt 0 ] || { echo "Arguments required." && exit 1; } 11 12 trap "exit 0" INT TERM EXIT 13 14 for i in "$@"; do 15 terminal-notifier -group mpv -title "$i" -message "Now playing $i"; 16 mpv --no-video --volume=50 "$i" 17 done