aboutsummaryrefslogtreecommitdiff
path: root/dmenu-urlselect
blob: d4e1f59d4dc326dbd83db9ce14be7ad35c01f344 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# Finds all URLs in stdin and prompts a dmenu choice, then writes the selected
# url to stdout.
# Usage: dmenu-urlselect [-m menu]
# Requires: dmenu (or similar), urlgrep

menu="dmenu -i -l 20"

while getopts "m:" opt; do
	case "$opt" in
		m)
			menu="$OPTARG"
			;;
		esac
done
shift `expr $OPTIND - 1`

urlgrep | $menu

Generated with cgit - Back to sebastiano.tronto.net