#!/bin/sh # Prompt for a URL or search term get_url() { dmenu -p "URL or search" } URL=$1 [ -n "$URL" ] || URL=$(xclip -selection clipboard -o) [ -n "$URL" ] || URL=$(get_url) [ -n "$URL" ] || exit echo "$URL" xdg-open $URL