summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2018-06-21 11:28:59 +0200
committerAlan Pearce2018-06-21 11:28:59 +0200
commit3ee4e29e788dbf5b7caff9c145ba82793d86a4f4 (patch)
tree1092c00cc5ec6052aa64226f7ecdb8017881f970 /emacs
parent0409b0d4c59db2a52e944e3766558f042035b790 (diff)
downloaddotfiles-3ee4e29e788dbf5b7caff9c145ba82793d86a4f4.tar.lz
dotfiles-3ee4e29e788dbf5b7caff9c145ba82793d86a4f4.tar.zst
dotfiles-3ee4e29e788dbf5b7caff9c145ba82793d86a4f4.zip
Emacs: use xdg-open when found, even if not in a DE
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index a059cce..cd858cf 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -319,6 +319,10 @@
             (setq exec-path-from-shell-arguments '("-l"))
             (exec-path-from-shell-initialize)))
 
+(with-eval-after-load 'browse-url
+  (when (executable-find "xdg-open")
+    (setq browse-url-browser-function #'browse-url-xdg-open)))
+
 ;;;;; NixOS sandboxes
 
 ;; I'm currently exploring using nix to create sandboxes for