aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-08-19 21:39:33 +1000
committerYuchen Pei <id@ypei.org>2023-08-19 21:39:33 +1000
commit851b8f5fac389364c579aabb8e8fba344a3f6929 (patch)
tree09c05a9cef7ca1ccd94708178fc53f1bdc6510dc /emacs
parent180b941004c96f16ef6b6d7a1c57d80cde146673 (diff)
Adding a command to browse with the mullvad browser
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init/ycp-complete.el1
-rw-r--r--emacs/.emacs.d/lisp/my/my-web.el6
2 files changed, 7 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init/ycp-complete.el b/emacs/.emacs.d/init/ycp-complete.el
index 29bdaf7..dec3ae3 100644
--- a/emacs/.emacs.d/init/ycp-complete.el
+++ b/emacs/.emacs.d/init/ycp-complete.el
@@ -280,6 +280,7 @@
(:name firefox :command browse-url-firefox)
(:name firefox-private :command my-browse-url-firefox-private)
(:name tor-browser :command my-browse-url-tor-browser)
+ (:name mullvad-browser :command my-browse-url-mullvad)
(:name qutebrowser :command my-browse-url-qutebrowser)
(:name download-and-open :command my-fetch-url)))
(my-setq-from-local hmm-handlers)
diff --git a/emacs/.emacs.d/lisp/my/my-web.el b/emacs/.emacs.d/lisp/my/my-web.el
index eced148..bd6a55d 100644
--- a/emacs/.emacs.d/lisp/my/my-web.el
+++ b/emacs/.emacs.d/lisp/my/my-web.el
@@ -80,6 +80,12 @@
(start-process (concat "qutebrowser " url) nil "qutebrowser"
url))
+(defun my-browse-url-mullvad (url)
+ "Browse URL with Mullvad browser."
+ (setq url (browse-url-encode-url url))
+ (start-process (concat "mullvad-browser " url) nil "mullvad-browser"
+ url))
+
;; TODO: change to using hmm matching url with default app
;; override browse-url
(defun my-browse-url (url &optional arg)