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,11 +8,15 @@ set ignorecase true
# Custom functions
cmd open ${{
case "${f##*.}" in
org) emacsclient -c "$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
}}
cmd mkdir ${{