Skip to content

Instantly share code, notes, and snippets.

@datMaffin
Created September 20, 2020 11:53
Show Gist options
  • Save datMaffin/d655e6b78d52942459b661114fef08f9 to your computer and use it in GitHub Desktop.
Save datMaffin/d655e6b78d52942459b661114fef08f9 to your computer and use it in GitHub Desktop.
When installing Okular with brew it is not possible to "open with" on macOS. This script can be used for "open with" on macOS.
on run {input, parameters}
if (count of input) > 0 then
repeat with f in input
set p to POSIX path of f
do shell script "open -a okular -n --args \"" & p & "\""
end repeat
else
do shell script "open -a okular -n"
end if
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment