From 086d468ac781b54152deec355a0c4558a414452f Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Fri, 22 May 2020 22:32:16 -0500 Subject: [PATCH] Add Web Search script to prompt dmenu for query to search DDG in surf --- scripts/appscripts/sxmo_websearch.sh | 9 +++++++++ scripts/core/sxmo_appmenu.sh | 1 + 2 files changed, 10 insertions(+) create mode 100755 scripts/appscripts/sxmo_websearch.sh diff --git a/scripts/appscripts/sxmo_websearch.sh b/scripts/appscripts/sxmo_websearch.sh new file mode 100755 index 0000000..8be5283 --- /dev/null +++ b/scripts/appscripts/sxmo_websearch.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh +pidof svkbd-sxmo || svkbd-sxmo & +SEARCHQUERY="$( + echo "Close Menu" | dmenu -p "Search Query:" -c -fn "Terminus-20" -l 20 +)" +pkill svkbd-sxmo +[ "Close Menu" = $SEARCHQUERY ] && exit 0 + +surf "https://duckduckgo.com/?q=${SEARCHQUERY}" diff --git a/scripts/core/sxmo_appmenu.sh b/scripts/core/sxmo_appmenu.sh index ed05b79..645e736 100755 --- a/scripts/core/sxmo_appmenu.sh +++ b/scripts/core/sxmo_appmenu.sh @@ -32,6 +32,7 @@ programchoicesinit() { # Scripts menu echo $WMCLASS | grep -i "scripts" && CHOICES="$(echo " + Web Search ^ 0 ^ sxmo_websearch.sh Timer ^ 0 ^ sxmo_timermenu.sh Youtube ^ 0 ^ sxmo_youtube.sh video Youtube (Audio) ^ 0 ^ sxmo_youtube.sh audio