too many things
This commit is contained in:
8
.config/yazi/keymap.toml
Normal file
8
.config/yazi/keymap.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "!"
|
||||
run = 'shell "$SHELL" --block'
|
||||
desc = "Open shell here"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "q"
|
||||
run = "plugin confirm-quit"
|
||||
20
.config/yazi/plugins/confirm-quit.yazi/main.lua
Normal file
20
.config/yazi/plugins/confirm-quit.yazi/main.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
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 = 9 },
|
||||
title = "Quit?",
|
||||
content = ui.Text("\nMultiple tabs are open.\n\nAre you sure you want to quit?"):wrap(ui.Text.WRAP),
|
||||
})
|
||||
if yes then
|
||||
ya.mgr_emit("quit", {})
|
||||
end
|
||||
end
|
||||
|
||||
return { entry = entry }
|
||||
19
.config/yazi/yazi.toml
Normal file
19
.config/yazi/yazi.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[mgr]
|
||||
ratio = [ 1,4,3 ]
|
||||
sort_dir_first = true
|
||||
linemode = "mtime"
|
||||
show_symlink = true
|
||||
scrolloff = 2
|
||||
wrap = true
|
||||
tab_size = 2
|
||||
image_delay = 100
|
||||
image_filter = "triangle"
|
||||
|
||||
[[confirm.quit]]
|
||||
enabled = true
|
||||
origin = "center"
|
||||
|
||||
[confirm.trash]
|
||||
|
||||
[confirm.delete]
|
||||
[confirm.overwrite]
|
||||
Reference in New Issue
Block a user