commit 330ad9d

hovercats  ·  2023-02-22 19:57:43 +0000 UTC
parent 31afd6d
dsearch: port to rc
1 files changed,  +16, -0
+16, -0
 1@@ -0,0 +1,16 @@
 2+#!/bin/rc
 3+
 4+# Search the web from dmenu
 5+# Does not handle URLs
 6+
 7+ENGINE='https://duckduckgo.com/?q='
 8+
 9+# Spaces are not allowed, so substitute them to correct string
10+STRING=`{printf '' | dmenu -p 'Search' | sed 's/ /%20/g'}
11+
12+if (test -z $STRING){
13+	exit 1
14+}
15+if not {
16+	$BROWSER $ENGINE$STRING
17+}