bin: Add durl script; fix browser Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Fri, 17 Jan 2020 22:13:07 +0530
2 files changed,
7 insertions(+),
1 deletions(-)
M
bin/browser
→
bin/browser
@@ -1,3 +1,3 @@
#!/bin/sh -tabbed vimb "$@" -e & +tabbed -df vimb -e > /tmp/tabbed.xid
A
bin/durl
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash + +regex='(https?|ftp|mailto)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' +url=$(grep -Eo "$regex" | dmenu -p "url:" -w "$WINDOWID" | tr -d '\n') +[[ "$url" = "" ]] && exit +vimb -e $(</tmp/tabbed.xid) "$url" &