Add reveal-in-file-browser

This commit is contained in:
2024-09-20 17:32:37 -07:00
parent c947a53dce
commit 7de477a211

View File

@@ -24,7 +24,8 @@
(delete-other-windows)))
(use-package emacs
:bind (("C-o" . nil)
:bind (("C-c o b" . reveal-in-file-browser)
("C-o" . nil)
("C-o C-o" . other-window)
("C-o o" . other-window)
("C-o b" . consult-buffer-other-window-no-focus)
@@ -151,3 +152,13 @@
(use-package explain-pause-mode
:ensure (:host github :repo "lastquestion/explain-pause-mode"))
(defun first-executable (candidates)
(seq-find #'executable-find candidates))
;; Reveal in finder/nautilus/whatever
(defun reveal-in-file-browser ()
(interactive)
(call-process
(first-executable '("xdg-open" "open"))
nil nil nil "."))