diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2021-07-13 10:47:39 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2021-08-17 09:52:24 -0400 |
commit | 466798679e7a2889622a491c776530c06668ca9f (patch) | |
tree | c0ebb8bdc0cc940f7cce465899a126f0f79a04ba /plugins/openfilelocation.lua | |
parent | fb647f8f0d972e85ac323b12eb65edf9c56b48cb (diff) | |
download | lite-xl-plugins-466798679e7a2889622a491c776530c06668ca9f.tar.gz lite-xl-plugins-466798679e7a2889622a491c776530c06668ca9f.zip |
Namespaced plugin configs.
Diffstat (limited to 'plugins/openfilelocation.lua')
-rw-r--r-- | plugins/openfilelocation.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/openfilelocation.lua b/plugins/openfilelocation.lua index d6c03b1..69fe9fa 100644 --- a/plugins/openfilelocation.lua +++ b/plugins/openfilelocation.lua @@ -4,12 +4,13 @@ local command = require "core.command" local config = require "core.config" +config.plugins.openfilelocation = {} if PLATFORM == "Windows" then - config.filemanager = "explorer" + config.plugins.openfilelocation.filemanager = "explorer" elseif PLATFORM == "Mac OS X" then - config.filemanager = "open" + config.plugins.openfilelocation.filemanager = "open" else - config.filemanager = "xdg-open" + config.plugins.openfilelocation.filemanager = "xdg-open" end @@ -23,9 +24,9 @@ command.add("core.docview", { local folder = doc.filename:match("^(.*)[/\\].*$") or "." core.log("Opening \"%s\"", folder) if PLATFORM == "Windows" then - system.exec(string.format("%s %s", config.filemanager, folder)) + system.exec(string.format("%s %s", config.plugins.openfilelocation.filemanager, folder)) else - system.exec(string.format("%s %q", config.filemanager, folder)) + system.exec(string.format("%s %q", config.plugins.openfilelocation.filemanager, folder)) end end }) |