aboutsummaryrefslogtreecommitdiffstats
path: root/dmenu/plumb
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu/plumb')
-rwxr-xr-xdmenu/plumb4
1 files changed, 4 insertions, 0 deletions
diff --git a/dmenu/plumb b/dmenu/plumb
index 13cfca8..c0d98f3 100755
--- a/dmenu/plumb
+++ b/dmenu/plumb
@@ -90,7 +90,11 @@ functions="$functions duckduckgo"
duckduckgo () {
exec $WEB_BROWSER "https://duckduckgo.com/?q=$sel";
}
+# TODO add other search engines
+if (( $(printf '%s' "$sel" | wc -m) > 100 )); then
+ sel='selected text'
+fi
function="$(printf '%s\n' $functions | dmenu -i -p "Plumb $sel to:" -l 50)"
if test -n "$function"; then