add urlhandler

This commit is contained in:
randomuser 2021-05-10 16:55:41 -05:00
parent dba873a10d
commit cbb66c88a8
2 changed files with 19 additions and 0 deletions

View File

@ -13,6 +13,7 @@ sh:
cp -f scripts/shime $(DESTDIR)$(PREFIX)/bin cp -f scripts/shime $(DESTDIR)$(PREFIX)/bin
cp -f scripts/wall $(DESTDIR)$(PREFIX)/bin cp -f scripts/wall $(DESTDIR)$(PREFIX)/bin
cp -f scripts/yt $(DESTDIR)$(PREFIX)/bin cp -f scripts/yt $(DESTDIR)$(PREFIX)/bin
cp -f scripts/urlhandle $(DESTDIR)$(PREFIX)/bin
mkc: mkc:
cc progs/scream.c -o progs/scream cc progs/scream.c -o progs/scream
c: c:

18
scripts/urlhandle Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# access gemini and gopher urls within vimb with vulpes proxy
# yes, this will result in urls like
# 'proto://host.tld/page?q="://" becoming
# 'proto/host.tld/page?q="/"
stripped_url=`printf "%s" $1 | sed 's|://|/|g'`
# use xdotool to type the correct commands into the vimb
# window, assuming that the window is currently focused (which
# happens most of the time)
xdotool key Escape
xdotool key Escape
xdotool type "ohttp://proxy.vulpes.one/${stripped_url}"
xdotool key Return
exit 0