summaryrefslogtreecommitdiff
path: root/ar/.config/yazi/plugins/smart-enter.yazi/main.lua
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-13 20:49:49 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-13 20:49:49 +0900
commitbdc608acabe856db2134642816cc806b34894863 (patch)
tree61cbcb30acbcafb56853bb77e5c89efae8f52dc2 /ar/.config/yazi/plugins/smart-enter.yazi/main.lua
parent805711c3406fd5360486460bcc6dfb6f741fd69c (diff)
modified shell/bm-dirs, modified shell/bm-files, created yazi/
Diffstat (limited to 'ar/.config/yazi/plugins/smart-enter.yazi/main.lua')
-rw-r--r--ar/.config/yazi/plugins/smart-enter.yazi/main.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/ar/.config/yazi/plugins/smart-enter.yazi/main.lua b/ar/.config/yazi/plugins/smart-enter.yazi/main.lua
new file mode 100644
index 0000000..e9e2ec6
--- /dev/null
+++ b/ar/.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 }