yazi updates:
This commit is contained in:
parent
67640f5f93
commit
0420380240
4 changed files with 40 additions and 94 deletions
12
flake.lock
generated
12
flake.lock
generated
|
@ -70,11 +70,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743846340,
|
||||
"narHash": "sha256-ZX+SirCnujuBuTftDXpL2IxzIO4UXGZdFiMy3pbHtRQ=",
|
||||
"lastModified": 1743870111,
|
||||
"narHash": "sha256-EHo0M6xC4xmZ3KmAEOi6dBsy7zuKSEyjglvoU+v8hyk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "f529d87520a4ca4083b94c28a47b33b3d9593669",
|
||||
"rev": "8eb8960e3aabf5486534c7ffad38504c53bf8d66",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -357,11 +357,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743860185,
|
||||
"narHash": "sha256-TkhfJ+vH+iGxLQL6RJLObMmldAQpysVJ+p1WnnKyIeQ=",
|
||||
"lastModified": 1743869639,
|
||||
"narHash": "sha256-Xhe3whfRW/Ay05z9m1EZ1/AkbV1yo0tm1CbgjtCi4rQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "b5e29565131802cc8adee7dccede794226da8614",
|
||||
"rev": "d094c6763c6ddb860580e7d3b4201f8f496a6836",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
|
||||
dir-rules = ./yazi/plugins/dir-rules.yazi;
|
||||
smart-tab = ./yazi/plugins/smart-tab.yazi;
|
||||
smart-paste = ./yazi/plugins/smart-paste.yazi;
|
||||
};
|
||||
|
||||
keymap = {
|
||||
|
|
|
@ -1,93 +1,25 @@
|
|||
require("git"):setup()
|
||||
require("dir-rules"):setup()
|
||||
-- require("yatline"):setup({
|
||||
-- section_separator = { open = "", close = "" },
|
||||
-- part_separator = { open = "", close = "" },
|
||||
-- inverse_separator = { open = "", close = "" },
|
||||
|
||||
-- style_a = {
|
||||
-- fg = "black",
|
||||
-- bg_mode = {
|
||||
-- normal = "white",
|
||||
-- select = "brightyellow",
|
||||
-- un_set = "brightred"
|
||||
-- }
|
||||
-- },
|
||||
-- style_b = { bg = "#111111", fg = "brightwhite" },
|
||||
-- style_c = { bg = "#111111", fg = "brightwhite" },
|
||||
Status:children_add(function()
|
||||
local h = cx.active.current.hovered
|
||||
if h == nil or ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
|
||||
-- permissions_t_fg = "green",
|
||||
-- permissions_r_fg = "yellow",
|
||||
-- permissions_w_fg = "red",
|
||||
-- permissions_x_fg = "cyan",
|
||||
-- permissions_s_fg = "white",
|
||||
return ui.Line {
|
||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||
":",
|
||||
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||
" ",
|
||||
}
|
||||
end, 500, Status.RIGHT)
|
||||
|
||||
-- tab_width = 20,
|
||||
-- tab_use_inverse = false,
|
||||
|
||||
-- selected = { icon = "", fg = "yellow" },
|
||||
-- copied = { icon = "", fg = "green" },
|
||||
-- cut = { icon = "", fg = "red" },
|
||||
|
||||
-- total = { icon = "", fg = "yellow" },
|
||||
-- succ = { icon = "", fg = "green" },
|
||||
-- fail = { icon = "", fg = "red" },
|
||||
-- found = { icon = "", fg = "blue" },
|
||||
-- processed = { icon = "", fg = "green" },
|
||||
|
||||
-- show_background = true,
|
||||
|
||||
-- display_header_line = true,
|
||||
-- display_status_line = true,
|
||||
|
||||
-- component_positions = { "header", "tab", "status" },
|
||||
|
||||
-- -- header_line = {
|
||||
-- -- left = {
|
||||
-- -- section_a = {
|
||||
-- -- {type = "line", custom = false, name = "tabs", params = {"left"}},
|
||||
-- -- },
|
||||
-- -- section_b = {
|
||||
-- -- },
|
||||
-- -- section_c = {
|
||||
-- -- }
|
||||
-- -- },
|
||||
-- -- right = {
|
||||
-- -- section_a = {
|
||||
-- -- },
|
||||
-- -- section_b = {
|
||||
-- -- },
|
||||
-- -- section_c = {
|
||||
-- -- }
|
||||
-- -- }
|
||||
-- -- },
|
||||
|
||||
-- status_line = {
|
||||
-- left = {
|
||||
-- section_a = {
|
||||
-- {type = "string", custom = false, name = "tab_mode"},
|
||||
-- },
|
||||
-- section_b = {
|
||||
-- {type = "string", custom = false, name = "hovered_size"},
|
||||
-- },
|
||||
-- section_c = {
|
||||
-- {type = "string", custom = false, name = "hovered_path"},
|
||||
-- { type = "coloreds", custom = false, name = "symlink" },
|
||||
-- {type = "coloreds", custom = false, name = "count"},
|
||||
-- }
|
||||
-- },
|
||||
-- right = {
|
||||
-- section_a = {
|
||||
-- {type = "string", custom = false, name = "cursor_position"},
|
||||
-- },
|
||||
-- section_b = {
|
||||
-- {type = "string", custom = false, name = "cursor_percentage"},
|
||||
-- },
|
||||
-- section_c = {
|
||||
-- {type = "string", custom = false, name = "hovered_file_extension", params = {true}},
|
||||
-- {type = "coloreds", custom = false, name = "permissions"},
|
||||
-- {type = "string", custom = false, name = "hovered_ownership"}
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- })
|
||||
Status:children_add(function(self)
|
||||
local h = self._current.hovered
|
||||
if h and h.link_to then
|
||||
return " -> " .. tostring(h.link_to)
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end, 3300, Status.LEFT)
|
||||
|
|
13
modules/home/yazi/plugins/smart-paste.yazi/main.lua
Normal file
13
modules/home/yazi/plugins/smart-paste.yazi/main.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- @sync entry
|
||||
return {
|
||||
entry = function()
|
||||
local h = cx.active.current.hovered
|
||||
if h and h.cha.is_dir then
|
||||
ya.mgr_emit("enter", {})
|
||||
ya.mgr_emit("paste", {})
|
||||
ya.mgr_emit("leave", {})
|
||||
else
|
||||
ya.mgr_emit("paste", {})
|
||||
end
|
||||
end,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue