1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

open org files in emacs

This commit is contained in:
Ryan Kes 2020-07-06 17:05:54 +02:00
parent b3cabf5c19
commit b064e976b4

View File

@ -8,10 +8,14 @@ set ignorecase true
# Custom functions # Custom functions
cmd open ${{ cmd open ${{
case $(file --mime-type "$f" -bL) in case "${f##*.}" in
text/*|application/json) nvim "$f";; org) emacsclient -c "$f";;
video/*|image/*/application/pdf) xdg-open "$f" & disown;; *)
*) xdg-open "$f" ;; case $(file --mime-type "$f" -bL) in
text/*|application/json) nvim "$f";;
video/*|image/*/application/pdf) xdg-open "$f" & disown;;
*) xdg-open "$f" ;;
esac
esac esac
}} }}