aboutsummaryrefslogtreecommitdiff
path: root/dmenu-urlselect
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2022-05-15 12:02:59 +0200
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2022-05-15 12:02:59 +0200
commit115ff9a06870d51702918cd926199e2271bf4f92 (patch)
tree4c2abf616b9eec3ba485f49bcefaf0a98882fa33 /dmenu-urlselect
parent5ca3ebbf7c3cef6db6b8270af4fcf0be087c29c1 (diff)
downloadscripts-115ff9a06870d51702918cd926199e2271bf4f92.tar.gz
scripts-115ff9a06870d51702918cd926199e2271bf4f92.zip
Added option to specify alternative menu. Some general cleanup.
Diffstat (limited to '')
-rwxr-xr-xdmenu-urlselect15
1 files changed, 12 insertions, 3 deletions
diff --git a/dmenu-urlselect b/dmenu-urlselect
index e19ec7b..d4e1f59 100755
--- a/dmenu-urlselect
+++ b/dmenu-urlselect
@@ -2,9 +2,18 @@
2 2
3# Finds all URLs in stdin and prompts a dmenu choice, then writes the selected 3# Finds all URLs in stdin and prompts a dmenu choice, then writes the selected
4# url to stdout. 4# url to stdout.
5# Usage: dmenu-urlselect [-m menu]
5# Requires: dmenu (or similar), urlgrep 6# Requires: dmenu (or similar), urlgrep
6 7
7menu=${MENU:-dmenu} 8menu="dmenu -i -l 20"
8menuopts="-l 20"
9 9
10urlgrep | $menu $menuopts 10while getopts "m:" opt; do
11 case "$opt" in
12 m)
13 menu="$OPTARG"
14 ;;
15 esac
16done
17shift `expr $OPTIND - 1`
18
19urlgrep | $menu

Generated with cgit - Back to sebastiano.tronto.net