#!/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 $(