diff options
Diffstat (limited to '.config/emacs/modules/bd--browse.el')
-rw-r--r-- | .config/emacs/modules/bd--browse.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/.config/emacs/modules/bd--browse.el b/.config/emacs/modules/bd--browse.el index 1d97760..f0a4f60 100644 --- a/.config/emacs/modules/bd--browse.el +++ b/.config/emacs/modules/bd--browse.el @@ -6,7 +6,17 @@ (require 'dash) (require 'fill-column) -(defconst bd/bookmarks nil) +(defun bd/browse (url &optional pref &rest _) + "Given PREF, launches URL in one of librewolf, torbrowser, +icecat, or eww." + (interactive) + (pcase pref + (0 (eww url)) + (1 (start-process "torbrowser" nil "torbrowser" "--new-window" url)) + (2 (start-process "icecat" nil "icecat" "--new-window" url)) + (_ (start-process "librewolf" nil "librewolf" "--new-window" url)))) +(setopt browse-url-browser-function 'bd/browse) + (defun bd/selector-bookmarks () "Selector source for all bookmarks." (selector-source-create |