include plugins
This commit is contained in:
parent
ae61234858
commit
cd81d7b2b4
21 changed files with 1201 additions and 0 deletions
18
.config/yazi/plugins/confirm-quit.yazi/main.lua
Normal file
18
.config/yazi/plugins/confirm-quit.yazi/main.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
local count = ya.sync(function() return #cx.tabs end)
|
||||
|
||||
local function entry()
|
||||
if count() < 2 then
|
||||
return ya.mgr_emit("quit", {})
|
||||
end
|
||||
|
||||
local yes = ya.confirm {
|
||||
pos = { "center", w = 60, h = 10 },
|
||||
title = "Quit?",
|
||||
content = ui.Text("There are multiple tabs open. Quit anyway?"):wrap(ui.Text.WRAP),
|
||||
}
|
||||
if yes then
|
||||
ya.mgr_emit("quit", {})
|
||||
end
|
||||
end
|
||||
|
||||
return { entry = entry }
|
Loading…
Add table
Add a link
Reference in a new issue