From b084f87e9e89a5312719b9cc229848221f1412f2 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 10 Nov 2025 21:15:55 -0500 Subject: Use eww as default browser for ddg and searx, fix browse-url in eww --- .config/emacs/modules/bd--browse.el | 18 ++++++++++++------ .config/guix/modules/packages/packages.scm | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) (limited to '.config') diff --git a/.config/emacs/modules/bd--browse.el b/.config/emacs/modules/bd--browse.el index e9c73f9..4b78de2 100644 --- a/.config/emacs/modules/bd--browse.el +++ b/.config/emacs/modules/bd--browse.el @@ -12,6 +12,7 @@ (pcase pref (0 (eww url)) (1 (start-process "torbrowser" nil "torbrowser" "--new-window" url)) + (2 (start-process "chromium" nil "chromium" "--new-window" url)) (_ (start-process "browser" nil "librewolf" "--new-window" url)))) (defun bd/selector-bookmarks () @@ -63,17 +64,17 @@ (selector-source-create "Browser" :candidates - (list (bd/search-candidate "SearXNG" "https://searx.operationnull.com/searxng/search?q=" 2) - (bd/search-candidate "DuckDuckGo" "https://duckduckgo.com/html/?q=" 2) - (bd/search-candidate "Wikipedia" "https://en.wikipedia.org/w/index.php?search=" 2) - (bd/search-candidate "Invidious" "https://inv.nadeko.net/search?q=" 0) - (bd/search-candidate "Urban Dictionary" "https://www.urbandictionary.com/define.php?term=" 2) + (list (bd/search-candidate "SearXNG" "https://searx.operationnull.com/searxng/search?q=" 0) + (bd/search-candidate "DuckDuckGo" "https://duckduckgo.com/html/?q=" 0) + (bd/search-candidate "Wikipedia" "https://en.wikipedia.org/w/index.php?search=" 3) + (bd/search-candidate "Invidious" "https://inv.nadeko.net/search?q=" 3) + (bd/search-candidate "Urban Dictionary" "https://www.urbandictionary.com/define.php?term=" 3) (bd/search-candidate "Archive of Our Own" "https://archiveofourown.org/works/search?work_search%5Bquery%5D=" 0) (bd/search-candidate "Archwiki" "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search=" 0) (bd/selector-rip-video) (bd/search-candidate "Torbrowser" "" 1) - (bd/search-candidate "Librewolf" "" 2)))) + (bd/search-candidate "Librewolf" "" 3)))) (defun bd/browse-dispatcher () "Select and `browse-url' a bookmark or search feature." @@ -117,6 +118,11 @@ (:map eww-mode-map ("i" . eww-toggle-images) ("o" . (lambda () (interactive) (rip-html (eww-current-url))))) + :hook + ;; eww-mode by default sets this as local var to eww-browse-url + ((eww-mode . + (lambda () + (setq-local browse-url-browser-function #'bd/browse)))) :config (setopt eww-search-prefix "https://searx.operationnull.com/searxng/search?q=" eww-auto-rename-buffer 'title diff --git a/.config/guix/modules/packages/packages.scm b/.config/guix/modules/packages/packages.scm index d481049..1a3619f 100644 --- a/.config/guix/modules/packages/packages.scm +++ b/.config/guix/modules/packages/packages.scm @@ -22,6 +22,7 @@ algebra ;; bc assembly ;; nasm base ;; make + chromium ;; ungoogled-chromium clojure ;; clojure commencement ;; gcc-toolchain compression ;; unzip, zip @@ -160,6 +161,7 @@ librewolf pdfgrep qemu + ungoogled-chromium xpdf ; pdftotext )) -- cgit v1.2.3