From fb5df91cad5b41dfa426f093805906af53b9891b Mon Sep 17 00:00:00 2001 From: fenze Date: Fri, 13 May 2022 14:41:24 +0200 Subject: [PATCH] fix default search engine when target isnt a bookmark --- makefile | 4 ++-- scripts/{rose-open.sh => dmenu_rose.sh} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename scripts/{rose-open.sh => dmenu_rose.sh} (90%) diff --git a/makefile b/makefile index 5717cce..67c2049 100644 --- a/makefile +++ b/makefile @@ -23,7 +23,7 @@ all: install: all su -c "cp -f ./rose /usr/local/bin/rose && \ - cp -f ./scripts/rose-open.sh /usr/local/bin/dmenu_rose" + cp -f ./scripts/dmenu_rose.sh /usr/local/bin/dmenu_rose" clean: rm -f rose compile_flags.txt @@ -31,4 +31,4 @@ clean: flags: echo $(CFLAGS) | sed 's/ /\n/g' > compile_flags.txt -.SILENT: all clean flags +.SILENT: all clean install flags diff --git a/scripts/rose-open.sh b/scripts/dmenu_rose.sh similarity index 90% rename from scripts/rose-open.sh rename to scripts/dmenu_rose.sh index 48c484d..dc0d44f 100755 --- a/scripts/rose-open.sh +++ b/scripts/dmenu_rose.sh @@ -27,11 +27,11 @@ search() [ -z "$ROSE_GO" ] || { [ -z "$(printf "$BOOKMARKS" | grep -w "$SEARCH")" ] && { - xprop -id "$CURRENT_ID" -f "_ROSE_GO" 8u -set "_ROSE_GO" $SEARCH + xprop -id "$CURRENT_ID" -f "_ROSE_GO" 8u -set "_ROSE_GO" https://duckduckgo.com/?q="$SEARCH" exit } || { FULL_URL=$(printf "$BOOKMARKS" | grep -w "$SEARCH" | sed 's/ /\./g') - xprop -id "$CURRENT_ID" -f "_ROSE_GO" 8u -set "_ROSE_GO" https://"$FULL_URL" + xprop -id "$CURRENT_ID" -f "_ROSE_GO" 8u -set "_ROSE_GO" $FULL_URL exit } }