diff options
Diffstat (limited to '.config/yazi/plugins/smart-enter.yazi/main.lua')
| -rw-r--r-- | .config/yazi/plugins/smart-enter.yazi/main.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/yazi/plugins/smart-enter.yazi/main.lua b/.config/yazi/plugins/smart-enter.yazi/main.lua new file mode 100644 index 0000000..37a465a --- /dev/null +++ b/.config/yazi/plugins/smart-enter.yazi/main.lua @@ -0,0 +1,10 @@ +--- @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.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi }) +end + +return { entry = entry, setup = setup } |
