From 54920103c2843f5a3620effbccaceaee7f6885c1 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 18 May 2019 00:07:32 -0400 Subject: scripts moved to ~/.local/bin --- .scripts/i3cmds/ducksearch | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100755 .scripts/i3cmds/ducksearch (limited to '.scripts/i3cmds/ducksearch') diff --git a/.scripts/i3cmds/ducksearch b/.scripts/i3cmds/ducksearch deleted file mode 100755 index 7b5bca6..0000000 --- a/.scripts/i3cmds/ducksearch +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Gives a dmenu prompt to search DuckDuckGo. -# Without input, will open DuckDuckGo.com. -# URLs will be directly handed to the browser. -# Anything else, it search it. -browser=${BROWSER:-firefox} - -pgrep -x dmenu && exit - -choice=$(echo "🦆" | dmenu -i -p "Search DuckDuckGo:") || exit 1 - -if [ "$choice" = "🦆" ]; then - $browser "https://duckduckgo.com" -else - if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then - $browser "$choice" - else - $browser "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1" - fi -fi -- cgit v1.3.1