+++ /dev/null
-#!/usr/bin/env sh
-
-cat ${1:-~/org/bookmarks} | dmenu -l 20 | xargs xdg-open
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env sh
+
+engine="https://duckduckgo.com?q="
+
+case "$1" in
+ uri)
+ :| dmenu -p "Open a URL:" | xargs -I % chorizo "%"
+ ;;
+ bookmark)
+ cat ${2:-~/org/bookmarks} | dmenu -l 20 -p "Open a bookmark:" \
+ | xargs -I % chorizo "%"
+ ;;
+ search)
+ :| dmenu -p "Search the web:" | xargs -I % chorizo "$engine%"
+ ;;
+ -h|--help|help)
+ echo "$0 [bookmark|help|search|uri]"
+ exit 0
+ ;;
+ *)
+ echo "No such option. See \"$0 help\" for more information."
+ exit 1
+ ;;
+esac
+
+input=$(echo "$input" | tr -d '\n')
+
+++ /dev/null
-bookmarks(1)
-
-# NAME
-bookmarks - select a bookmark with dmenu
-
-# SYNOPSIS
-*bookmarks*++
-*bookmarks [path to bookmarks file]*
-
-# DESCRIPTION
-Allows you to select a bookmark from a list of newline delimited urls (defaults
-to ~/org/bookmarks) and open it in the default browser.
-
-# COPYRIGHT
-This is free and unencumbered software released into the public domain. For more
-information, please refer to <https://unlicense.org/>.
--- /dev/null
+dweb(1)
+
+# NAME
+dweb - dynamic prompt to browse the web
+
+# SYNOPSIS
+*dweb* bookmark++
+*dweb* bookmark [path to bookmarks file]++
+*dweb* help++
+*dweb* search++
+*dweb* uri
+
+# DESCRIPTION
+Launches a dmenu prompting you based on the subcommand.
+
+*bookmark*
+ Allows you to select a bookmark from a list of newline delimited
+ urls (defaults to ~/org/bookmarks) and open it in the default browser.
+
+*help*
+ Show help information.
+
+*search*
+ Search the web using a search engine.
+
+*uri*
+ Open a URI.
+
+# COPYRIGHT
+This is free and unencumbered software released into the public domain. For more
+information, please refer to <https://unlicense.org/>.