1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-10-01 14:39:19 +00:00

qute: let priviblur userscript switch instances too

This commit is contained in:
Phantop 2024-06-22 01:49:43 -04:00
parent 0d0e841bff
commit e83f9cc49f

View file

@ -1,8 +1,11 @@
#!/usr/bin/fish
set json (trurl --json $QUTE_URL | jq .[].parts)
set blog (echo $json | jq -r .host | cut -d. -f1)
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)
echo "open $instance/$blog$page" >> $QUTE_FIFO
if string match '* - Priviblur' $QUTE_TITLE
set blog ''
end
echo "open $instance$blog$page" >> $QUTE_FIFO