feat: add hide-preview, max-preview plugins

This commit is contained in:
sxyazi
2024-06-16 16:58:25 +08:00
parent db660364e9
commit ff84ac3d42
8 changed files with 135 additions and 4 deletions

22
max-preview.yazi/init.lua Normal file
View File

@@ -0,0 +1,22 @@
local function entry(st)
if st.old then
Manager.layout, st.old = st.old, nil
else
st.old = Manager.layout
Manager.layout = function(self, area)
self.area = area
return ui.Layout()
:direction(ui.Layout.HORIZONTAL)
:constraints({
ui.Constraint.Percentage(0),
ui.Constraint.Percentage(0),
ui.Constraint.Percentage(100),
})
:split(area)
end
end
ya.app_emit("resize", {})
end
return { entry = entry }