aboutsummaryrefslogtreecommitdiff
path: root/plugins/openfilelocation.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/openfilelocation.lua')
-rw-r--r--plugins/openfilelocation.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/openfilelocation.lua b/plugins/openfilelocation.lua
index 48877bd..4b89815 100644
--- a/plugins/openfilelocation.lua
+++ b/plugins/openfilelocation.lua
@@ -1,15 +1,16 @@
--- mod-version:1 -- lite-xl 1.16
+-- mod-version:2 -- lite-xl 2.0
local core = require "core"
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
})