summaryrefslogtreecommitdiff
path: root/eww-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'eww-conf.el')
-rw-r--r--eww-conf.el17
1 files changed, 16 insertions, 1 deletions
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)