fix default search engine when target isnt a bookmark
This commit is contained in:
parent
8161461da7
commit
fb5df91cad
4
makefile
4
makefile
|
@ -23,7 +23,7 @@ all:
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
su -c "cp -f ./rose /usr/local/bin/rose && \
|
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:
|
clean:
|
||||||
rm -f rose compile_flags.txt
|
rm -f rose compile_flags.txt
|
||||||
|
@ -31,4 +31,4 @@ clean:
|
||||||
flags:
|
flags:
|
||||||
echo $(CFLAGS) | sed 's/ /\n/g' > compile_flags.txt
|
echo $(CFLAGS) | sed 's/ /\n/g' > compile_flags.txt
|
||||||
|
|
||||||
.SILENT: all clean flags
|
.SILENT: all clean install flags
|
||||||
|
|
|
@ -27,11 +27,11 @@ search()
|
||||||
|
|
||||||
[ -z "$ROSE_GO" ] || {
|
[ -z "$ROSE_GO" ] || {
|
||||||
[ -z "$(printf "$BOOKMARKS" | grep -w "$SEARCH")" ] && {
|
[ -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
|
exit
|
||||||
} || {
|
} || {
|
||||||
FULL_URL=$(printf "$BOOKMARKS" | grep -w "$SEARCH" | sed 's/ /\./g')
|
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
|
exit
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user