all repos — dotfiles @ d2748809cd14853cba6fe6058a5e940f82d7336b

my *nix dotfiles

bin/durl (view raw)

 1#!/usr/bin/env bash
 2
 3regex='(https?|ftp|mailto)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
 4url=$(grep -Eo "$regex" | dmenu -p "url:" -w "$WINDOWID" | tr -d '\n')
 5[[ "$url" = "" ]] && exit
 6
 7if [[ "$(pgrep vimb)" != "" ]]; then
 8    vimb -e $(</tmp/tabbed.xid) "$url" &
 9else
10    firefox --new-tab "$url"
11fi