From 3c65a36fd27a30f5105604a49aef45a6265e1fcf Mon Sep 17 00:00:00 2001 From: Anjandev Momi Date: Mon, 8 Jun 2020 01:46:11 -0700 Subject: [PATCH] files: play audio files with mpv no-vid and add mp3 support Signed-off-by: Miles Alan --- scripts/appscripts/sxmo_files.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/appscripts/sxmo_files.sh b/scripts/appscripts/sxmo_files.sh index 1f5c693..4281419 100755 --- a/scripts/appscripts/sxmo_files.sh +++ b/scripts/appscripts/sxmo_files.sh @@ -3,8 +3,10 @@ EDITOR=vis cd "/home/$USER/" || exit 1 handlefiles() { - if echo "$1" | grep -iE ".(wav|webm|mp4|ogg|opus|m4a|flac|mov|avi)$"; then + if echo "$1" | grep -iE ".(webm|ogg|mp4|mov|avi)$"; then st -e mpv "$@" + elif echo "$1" | grep -iE ".(wav|opus|m4a|flac|mp3)$"; then + st -e mpv --vid=no -v "$@" elif echo "$1" | grep -iE ".(jpg|png|gif)$"; then st -e sxiv "$@" else