diff options
Diffstat (limited to 'dmenu-urlselect')
| -rwxr-xr-x | dmenu-urlselect | 15 |
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 | ||
| 7 | menu=${MENU:-dmenu} | 8 | menu="dmenu -i -l 20" |
| 8 | menuopts="-l 20" | ||
| 9 | 9 | ||
| 10 | urlgrep | $menu $menuopts | 10 | while getopts "m:" opt; do |
| 11 | case "$opt" in | ||
| 12 | m) | ||
| 13 | menu="$OPTARG" | ||
| 14 | ;; | ||
| 15 | esac | ||
| 16 | done | ||
| 17 | shift `expr $OPTIND - 1` | ||
| 18 | |||
| 19 | urlgrep | $menu | ||
