dots

my dotfiles
git clone https://git.awy.one/dots
Log | Files | Refs | Submodules | README | LICENSE

commit 0b1c6c3ad6bb5693947aa75e1cc75ef08f451d3c
parent 8136066fcfe09eca5a0a33cb66a979fc56a48b42
Author: awy <awy@awy.one>
Date:   Mon, 29 Dec 2025 03:34:30 +0300

linkhandler

Diffstat:
M.local/bin/linkhandler | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler @@ -12,14 +12,13 @@ else url="$1" fi -# Check if the URL is from inv.nadeko.net and adjust it for YouTube -echo "$url" | rg -q 'inv.nadeko.net/watch' -if [ $? -eq 0 ]; then - url="https://www.youtube.com/watch?v=$(echo "$url" | sed 's/.*inv\.nadeko\.net\/watch?v=\([^&]*\)/\1/')" -fi +# fuck youtube throttling +echo "$url" | rg -q 'youtube\.com/watch' && { + url="https://invidious.tmiland.com/watch?v=$(echo "$url" | sed 's/.*v=\([^&]*\)/\1/')" +} case "$url" in -*mkv | *webm | *mp4 | *youtube.com/watch* | *youtube.com/playlist* | *youtube.com/v/* | *youtube.com/shorts* | *youtu.be* | *hooktube.com* | *bitchute.com* | *videos.lukesmith.xyz* | *odysee.com*) +*mkv | *webm | *mp4 | *invidious*/watch* | *youtube.com/watch* | *youtube.com/playlist* | *youtube.com/v/* | *youtube.com/shorts* | *youtu.be* | *hooktube.com* | *bitchute.com* | *videos.lukesmith.xyz* | *odysee.com*) setsid -f mpv -quiet "$url" >/dev/null 2>&1 ;; *png | *jpg | *jpe | *jpeg | *gif | *webp)