diff options
Diffstat (limited to 'plugins/openfilelocation.lua')
-rw-r--r-- | plugins/openfilelocation.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/openfilelocation.lua b/plugins/openfilelocation.lua index b16ee82..0328142 100644 --- a/plugins/openfilelocation.lua +++ b/plugins/openfilelocation.lua @@ -5,15 +5,16 @@ local config = require "core.config" config.plugins.openfilelocation = {} -if PLATFORM == "Windows" then - config.plugins.openfilelocation.filemanager = "explorer" -elseif PLATFORM == "Mac OS X" then - config.plugins.openfilelocation.filemanager = "open" -else - config.plugins.openfilelocation.filemanager = "xdg-open" +if not config.plugins.openfilelocation.filemanager then + if PLATFORM == "Windows" then + config.plugins.openfilelocation.filemanager = "explorer" + elseif PLATFORM == "Mac OS X" then + config.plugins.openfilelocation.filemanager = "open" + else + config.plugins.openfilelocation.filemanager = "xdg-open" + end end - command.add("core.docview", { ["open-file-location:open-file-location"] = function() local doc = core.active_view.doc |