From 2c44ee2b73bfd517fde7dbfe998f1414c712aa39 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 11 Oct 2018 19:45:23 -0400 Subject: duckduckgo search binding added with dox --- .scripts/ducksearch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .scripts/ducksearch (limited to '.scripts/ducksearch') diff --git a/.scripts/ducksearch b/.scripts/ducksearch new file mode 100755 index 0000000..13a1e19 --- /dev/null +++ b/.scripts/ducksearch @@ -0,0 +1,15 @@ +#!/bin/sh + +# Gives a dmenu prompt to search DuckDuckGo. +# Without input, will open DuckDuckGo.com. +# Anything else, it search it. + +pgrep -x dmenu && exit + +choice=$(echo "🦆" | dmenu -i -p "Search DuckDuckGo:") || exit 1 + +if [ "$choice" = "🦆" ]; then + $BROWSER "https://duckduckgo.com" +else + $BROWSER "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1" +fi -- cgit v1.3.1