aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix4
-rw-r--r--lua.lua22
2 files changed, 26 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index cf2cd14..d9352dc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -375,6 +375,10 @@
}
];
+ extraLuaFiles = [
+ ./lua.lua
+ ];
+
};
}
];
diff --git a/lua.lua b/lua.lua
new file mode 100644
index 0000000..0750d6c
--- /dev/null
+++ b/lua.lua
@@ -0,0 +1,22 @@
+require("neo-tree").setup({
+ window = {
+ mappings = {
+ ["<F5>"] = "refresh",
+ ["o"] = "open",
+ }
+ },
+ filesystem = {
+ window = {
+ mappings = {
+ ["O"] = {
+ command = function(state)
+ local node = state.tree:get_node()
+ local cmd = "thunar '" .. node.path .. "'" .. " > /dev/null 2>&1"
+ print("Opening: " .. node.path) -- Debug statement
+ os.execute(cmd)
+ end,
+ },
+ },
+ },
+ },
+})