summaryrefslogtreecommitdiff
path: root/debian/.config/yazi/plugins/smart-enter.yazi/main.lua
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-12-24 13:54:03 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-12-24 13:54:03 +0900
commit28e8bdf7f8286bd431b7f3b709e79f3827b31469 (patch)
tree85b44eff6da4d8443198fb6e04dfb6ee55244588 /debian/.config/yazi/plugins/smart-enter.yazi/main.lua
parent8470ff001befcfd0f626dea69a9e76d43aee0511 (diff)
updates
Diffstat (limited to 'debian/.config/yazi/plugins/smart-enter.yazi/main.lua')
-rw-r--r--debian/.config/yazi/plugins/smart-enter.yazi/main.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/.config/yazi/plugins/smart-enter.yazi/main.lua b/debian/.config/yazi/plugins/smart-enter.yazi/main.lua
new file mode 100644
index 0000000..e9e2ec6
--- /dev/null
+++ b/debian/.config/yazi/plugins/smart-enter.yazi/main.lua
@@ -0,0 +1,11 @@
+--- @since 25.5.31
+--- @sync entry
+
+local function setup(self, opts) self.open_multi = opts.open_multi end
+
+local function entry(self)
+ local h = cx.active.current.hovered
+ ya.emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi })
+end
+
+return { entry = entry, setup = setup }