I'd like to change the way org-links behave on clicking only when it's a text file etc.
i.e. I'd like to have org-links opens up a new frame with the buffer of the link in it only when it's the link of a .txt, .el, or .png file. I already found a snippet below that basically does this, but I can't figure out how to assign this command to the left click so that it runs the command only when it's on org-links. How can I do that?
(defun zin/org-open-other-frame ()
"Jump to bookmark in another frame. See `bookmark-jump' for more."
(interactive)
(let ((org-link-frame-setup (acons 'file 'find-file-other-frame org-link-frame-setup)))
(org-open-at-point)))