1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-24 15:53:08 +00:00
dotfiles/qutebrowser/userscripts/priviblur

12 lines
472 B
Fish
Executable file

#!/usr/bin/fish
set json (trurl --json $QUTE_URL | jq .[].parts)
set blog /(echo $json | jq -r .host | cut -d. -f1)
set page (echo $json | jq -r .path)
set instances https://github.com/syeopite/priviblur/raw/master/instances.md
set instances priviblur.fly.dev (curl -L $instances | grep https | awk -F'[][]' '{print $2}')
set instance (random choice $instances)
if string match '* - Priviblur' $QUTE_TITLE
set blog ''
end
echo "open $instance$blog$page" >> $QUTE_FIFO