Always kick mpv to use -ao=alsa; prevents alsa from trying to use pulse

master
Miles Alan 5 years ago
parent 9919f49d82
commit e0067998c8
  1. 4
      scripts/appscripts/sxmo_files.sh
  2. 2
      scripts/appscripts/sxmo_record.sh
  3. 4
      scripts/appscripts/sxmo_youtube.sh
  4. 6
      scripts/core/sxmo_urlhandler.sh

@ -6,9 +6,9 @@ cd "$DIR" || exit 1
handlefiles() { handlefiles() {
if echo "$1" | grep -iE ".(webm|ogg|mp4|mov|avi)$"; then if echo "$1" | grep -iE ".(webm|ogg|mp4|mov|avi)$"; then
st -e mpv "$@" st -e mpv -ao=alsa "$@"
elif echo "$1" | grep -iE ".(wav|opus|m4a|flac|mp3)$"; then elif echo "$1" | grep -iE ".(wav|opus|m4a|flac|mp3)$"; then
st -e mpv --vid=no -v "$@" st -e mpv -ao=alsa --vid=no -v "$@"
elif echo "$1" | grep -iE ".(jpg|png|gif)$"; then elif echo "$1" | grep -iE ".(jpg|png|gif)$"; then
st -e sxiv "$@" st -e sxiv "$@"
else else

@ -41,7 +41,7 @@ recordconfirm() {
dmenu -p "$DUR" -fn Terminus-18 -c -l 10 dmenu -p "$DUR" -fn Terminus-18 -c -l 10
)" )"
if echo "$PICK" | grep "Playback"; then if echo "$PICK" | grep "Playback"; then
st -e mpv -v "$FILE" st -e mpv -ao=alsa -v "$FILE"
elif echo "$PICK" | grep "Delete Recording"; then elif echo "$PICK" | grep "Delete Recording"; then
rm "$FILE" rm "$FILE"
echo "File deleted." | dmenu -fn Terminus-18 -c -l 10 echo "File deleted." | dmenu -fn Terminus-18 -c -l 10

@ -29,12 +29,12 @@ menu() {
video() { video() {
menu menu
st -e mpv -v --ytdl-format='[height<420]' "$URL" st -e mpv -ao=alsa -v --ytdl-format='[height<420]' "$URL"
} }
audio() { audio() {
menu menu
st -e mpv -v --no-video "$URL" st -e mpv -ao=alsa -v --no-video "$URL"
} }
$1 $1

@ -24,13 +24,13 @@ fi
COMMAND=$( COMMAND=$(
echo " echo "
w3m URL w3m URL
mpv -v URL mpv -ao=alsa -v URL
mpv -v --ytdl-format='[height<420]' URL mpv -ao=alsa -v --ytdl-format='[height<420]' URL
firefox -new-window URL firefox -new-window URL
netsurf URL netsurf URL
surf URL surf URL
echo URL | xsel -i echo URL | xsel -i
youtube-dl -o- URL | mpv -v - youtube-dl -o- URL | mpv -ao=alsa -v -
youtube-dl URL youtube-dl URL
curl URL | vis - curl URL | vis -
wget URL wget URL

Loading…
Cancel
Save