#!/bin/sh [ ! -f $HOME/bookmarks.txt ] && { notify-send "$HOME/bookmarks.txt not found" exit 0 } BROWSERS="vimb --incognito\nvimb\nbadwolf\nlinks\nmpv\nlibrewolf\nfirefox\nwl-copy" tmp=$(mktemp --suffix=_$(basename $0).tmp) grep -REh '^url: http' $PASS $PASSWORD_STORE_DIR_PLAIN | cut -d' ' -f2 >> $tmp grep -RhE '^URL' ~/addressbooks/home-xandikos/companies_banks | dos2unix | sed -En 's/.*(http.*$)/\1/p' >> $tmp cat $HOME/bookmarks.txt >> $tmp choice=$(cat $tmp | $PICKER) rm $tmp URI="${choice##* }" [ -z "$URI" ] && exit 1 printf "%s\n" $URI case "$URI" in https://vk.com/video-*|https://odysee.com/*livestream*|*.m3u8|https://youtube.com/*/live) mpv "$URI" & exit ;; https://t.me/s/*) foot sh -c "links -dump $URI | less" exit ;; https://rumble.com/c/*) BROWSERS=$BROWSERS"\nrumble-get-vids-of-channel.sh\n" ;; *) ;; esac BROWSER=$(printf "$BROWSERS" | $PICKER) case $BROWSER in rumble-get-vids-of-channel.sh) u=$($BROWSER $URI | $PICKER | awk '{print $2}') fmt=$(yt-dlp --no-colors -Fq "$u" | awk 'NR>2 && !/^timeline.*/ && !/Timeline/' \ | $PICKER | awk '{print $1}') mpv --ytdl-format=$fmt "$u" & ;; links) #printf "ff\n" foot links "$URI" ;; *) $BROWSER $URI ;; esac