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:
parent
b3cabf5c19
commit
b064e976b4
@ -8,11 +8,15 @@ set ignorecase true
|
|||||||
|
|
||||||
# Custom functions
|
# Custom functions
|
||||||
cmd open ${{
|
cmd open ${{
|
||||||
|
case "${f##*.}" in
|
||||||
|
org) emacsclient -c "$f";;
|
||||||
|
*)
|
||||||
case $(file --mime-type "$f" -bL) in
|
case $(file --mime-type "$f" -bL) in
|
||||||
text/*|application/json) nvim "$f";;
|
text/*|application/json) nvim "$f";;
|
||||||
video/*|image/*/application/pdf) xdg-open "$f" & disown;;
|
video/*|image/*/application/pdf) xdg-open "$f" & disown;;
|
||||||
*) xdg-open "$f" ;;
|
*) xdg-open "$f" ;;
|
||||||
esac
|
esac
|
||||||
|
esac
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd mkdir ${{
|
cmd mkdir ${{
|
||||||
|
Loading…
Reference in New Issue
Block a user