aboutsummaryrefslogtreecommitdiffstats
path: root/dmenu/plumb
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
committerMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
commit0f1df0db903ba576fd17b08197d3066af7a61e5f (patch)
treea59c04307b1382257afa3c3512ec3abadf7e0e47 /dmenu/plumb
parentUse losetup -d instead of --detach and add clean up (diff)
downloaddotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.gz
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.bz2
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.xz
A lot of changes
Signed-off-by: Mattias Andrée <maandree@kth.se>
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