From f9f272c614f75878d012f5d655393cc73e319321 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 6 Mar 2021 14:56:30 +0800 Subject: Use searx as the default search engine. This seems to be both faster and to produce more results. --- eww-conf.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'eww-conf.el') diff --git a/eww-conf.el b/eww-conf.el index 8b8a379..d10b3a5 100644 --- a/eww-conf.el +++ b/eww-conf.el @@ -13,7 +13,22 @@ (setq eww-bookmarks-directory load-file-directory) -(setq eww-search-prefix "https://duckduckgo.com/lite/?q=") +(setq eww-search-prefix "https://searx.lukesmith.xyz/search?q=") + +(define-key eww-mode-map (vector 'C-tab) + #'durand-eww-goto-search-result) + +;;;###autoload +(defun durand-eww-goto-search-result () + "Go to the search results on a search page. +Otherwise, just go to the beginning of the page." + (interactive) + (save-match-data + (cond + ((string-match-p "searx\\." (plist-get eww-data :url)) + (re-search-forward "search results")) + ((goto-char (point-min))))) + (recenter 0)) (provide 'eww-conf) -- cgit v1.2.3-18-g5258