dotfiles/home/swallow

23 lines
218 B
Bash

#!/bin/sh
MPV=/usr/bin/mpv
mpv() {
EXT=${*##*.}
case "$*" in
*--no-video*)
$MPV $*
;;
*)
case "$EXT" in
ogg|opus|mp3)
$MPV $*
;;
*)
swallow $MPV $*
;;
esac
;;
esac
}