From 2f4c2a68a1cbebb0e06a5b3296e4bbb575c5fcb2 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 5 Nov 2018 17:51:24 -0500 Subject: scripts sorted --- .scripts/i3cmds/ducksearch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .scripts/i3cmds/ducksearch (limited to '.scripts/i3cmds/ducksearch') diff --git a/.scripts/i3cmds/ducksearch b/.scripts/i3cmds/ducksearch new file mode 100755 index 0000000..13a1e19 --- /dev/null +++ b/.scripts/i3cmds/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