added small hacky script to open youtube links always in mpv

This commit is contained in:
2026-03-10 12:48:44 +01:00
parent 32b1ded850
commit d1ca997ad2
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/bash
BROWSER=firefox.desktop
if [[ "$1" =~ ^https?://(www\.)?(youtube\.com/watch|youtu\.be)/ ]]; then
mpv "$1"
elif [[ "$1" =~ ^https?://(www\.)?(youtube\.com/shorts|youtu\.be)/ ]]; then
mpv "$1"
else
gtk-launch "$BROWSER" "$1"
fi