diff --git a/Makefile b/Makefile index 181e1e0..e3f316d 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ sh: cp -f scripts/shime $(DESTDIR)$(PREFIX)/bin cp -f scripts/wall $(DESTDIR)$(PREFIX)/bin cp -f scripts/yt $(DESTDIR)$(PREFIX)/bin + cp -f scripts/urlhandle $(DESTDIR)$(PREFIX)/bin mkc: cc progs/scream.c -o progs/scream c: diff --git a/scripts/urlhandle b/scripts/urlhandle new file mode 100755 index 0000000..b8a3658 --- /dev/null +++ b/scripts/urlhandle @@ -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