diff options
| author | bd <bdunahu@operationnull.com> | 2025-11-10 21:33:42 -0500 |
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-11-10 21:33:42 -0500 |
| commit | 613e25c81e8e53befae362fd827eed37efa2fcbb (patch) | |
| tree | 94e070b59791d6ed98b163864c8e7bdca2ac3fa4 /.config/emacs/modules/bd--browse.el | |
| parent | b084f87e9e89a5312719b9cc229848221f1412f2 (diff) | |
use symbols instead of integers in browse case statement
Diffstat (limited to '.config/emacs/modules/bd--browse.el')
| -rw-r--r-- | .config/emacs/modules/bd--browse.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/.config/emacs/modules/bd--browse.el b/.config/emacs/modules/bd--browse.el index 4b78de2..3fdd2c9 100644 --- a/.config/emacs/modules/bd--browse.el +++ b/.config/emacs/modules/bd--browse.el @@ -10,9 +10,9 @@ "Given PREF, launches URL in an external browser or eww." (interactive) (pcase pref - (0 (eww url)) - (1 (start-process "torbrowser" nil "torbrowser" "--new-window" url)) - (2 (start-process "chromium" nil "chromium" "--new-window" url)) + ('eww (eww url)) + ('tor (start-process "torbrowser" nil "torbrowser" "--new-window" url)) + ('chromium (start-process "chromium" nil "chromium" "--new-window" url)) (_ (start-process "browser" nil "librewolf" "--new-window" url)))) (defun bd/selector-bookmarks () @@ -64,17 +64,17 @@ (selector-source-create "Browser" :candidates - (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) + (list (bd/search-candidate "SearXNG" "https://searx.operationnull.com/searxng/search?q=" 'eww) + (bd/search-candidate "DuckDuckGo" "https://duckduckgo.com/html/?q=" 'eww) + (bd/search-candidate "Wikipedia" "https://en.wikipedia.org/w/index.php?search=" 'wolf) + (bd/search-candidate "Invidious" "https://inv.nadeko.net/search?q=" 'wolf) + (bd/search-candidate "Urban Dictionary" "https://www.urbandictionary.com/define.php?term=" 'wolf) + (bd/search-candidate "Archive of Our Own" "https://archiveofourown.org/works/search?work_search%5Bquery%5D=" 'eww) + (bd/search-candidate "Archwiki" "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search=" 'eww) (bd/selector-rip-video) - (bd/search-candidate "Torbrowser" "" 1) - (bd/search-candidate "Librewolf" "" 3)))) + (bd/search-candidate "Torbrowser" "" 'tor) + (bd/search-candidate "Librewolf" "" 'wolf)))) (defun bd/browse-dispatcher () "Select and `browse-url' a bookmark or search feature." |
