dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 410485ab32a59692e15b9053300a9f1a6596e31b
parent 5c74149b0a397a34fe803afa04a5b2ece247dfe9
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 17 Dec 2018 11:10:54 +0100

Add duckduckgo search via dmenu

Diffstat:
Mlinks/.config/i3/config | 1+
Alinks/bin/ducksearch | 13+++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/links/.config/i3/config b/links/.config/i3/config @@ -56,6 +56,7 @@ bindsym $mod+Return exec $term -e tmux bindsym $mod+Shift+Return exec $term # other application launchers +bindsym Mod1+space exec ~/bin/ducksearch bindsym $mod+m exec $term -e ~/bin/tmux-mutt.sh bindsym $mod+r exec $term -e ~/bin/tmux-newsboat.sh bindsym $mod+c exec $term -e ~/bin/google-cloud-lamps-instance1-ssh.sh diff --git a/links/bin/ducksearch b/links/bin/ducksearch @@ -0,0 +1,13 @@ +#!/bin/sh + +browser=${BROWSER:-firefox} + +pgrep -x dmenu && exit + +choice=$(echo "duckduckgo.com" | dmenu -i -p "Search DuckDuckGo:") || exit 1 + +if [ "$choice" = "duckduckgo.com" ]; then + $browser "https://duckduckgo.com" +else + $browser "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1" +fi