added small hacky script to open youtube links always in mpv
This commit is contained in:
10
dot_local/bin/executable_xdg-https-handler
Normal file
10
dot_local/bin/executable_xdg-https-handler
Normal 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
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=HTTPS Handler
|
||||||
|
Exec=xdg-https-handler %u
|
||||||
|
Categroies=Network;WebBrowser;
|
||||||
|
NoDisplay=true
|
||||||
|
MimeType=x-scheme-handler/unknown;x-scheme-handler/about;x-scheme-handler/https;x-scheme-handler/http;text/html;text/xml;application/xhtml+xml;
|
||||||
Reference in New Issue
Block a user