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"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743846340,
|
"lastModified": 1743870111,
|
||||||
"narHash": "sha256-ZX+SirCnujuBuTftDXpL2IxzIO4UXGZdFiMy3pbHtRQ=",
|
"narHash": "sha256-EHo0M6xC4xmZ3KmAEOi6dBsy7zuKSEyjglvoU+v8hyk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "f529d87520a4ca4083b94c28a47b33b3d9593669",
|
"rev": "8eb8960e3aabf5486534c7ffad38504c53bf8d66",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -357,11 +357,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743860185,
|
"lastModified": 1743869639,
|
||||||
"narHash": "sha256-TkhfJ+vH+iGxLQL6RJLObMmldAQpysVJ+p1WnnKyIeQ=",
|
"narHash": "sha256-Xhe3whfRW/Ay05z9m1EZ1/AkbV1yo0tm1CbgjtCi4rQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "b5e29565131802cc8adee7dccede794226da8614",
|
"rev": "d094c6763c6ddb860580e7d3b4201f8f496a6836",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
|
|
||||||
dir-rules = ./yazi/plugins/dir-rules.yazi;
|
dir-rules = ./yazi/plugins/dir-rules.yazi;
|
||||||
smart-tab = ./yazi/plugins/smart-tab.yazi;
|
smart-tab = ./yazi/plugins/smart-tab.yazi;
|
||||||
|
smart-paste = ./yazi/plugins/smart-paste.yazi;
|
||||||
};
|
};
|
||||||
|
|
||||||
keymap = {
|
keymap = {
|
||||||
|
|
|
@ -1,93 +1,25 @@
|
||||||
require("git"):setup()
|
require("git"):setup()
|
||||||
require("dir-rules"):setup()
|
require("dir-rules"):setup()
|
||||||
-- require("yatline"):setup({
|
|
||||||
-- section_separator = { open = "", close = "" },
|
|
||||||
-- part_separator = { open = "", close = "" },
|
|
||||||
-- inverse_separator = { open = "", close = "" },
|
|
||||||
|
|
||||||
-- style_a = {
|
Status:children_add(function()
|
||||||
-- fg = "black",
|
local h = cx.active.current.hovered
|
||||||
-- bg_mode = {
|
if h == nil or ya.target_family() ~= "unix" then
|
||||||
-- normal = "white",
|
return ""
|
||||||
-- select = "brightyellow",
|
end
|
||||||
-- un_set = "brightred"
|
|
||||||
-- }
|
|
||||||
-- },
|
|
||||||
-- style_b = { bg = "#111111", fg = "brightwhite" },
|
|
||||||
-- style_c = { bg = "#111111", fg = "brightwhite" },
|
|
||||||
|
|
||||||
-- permissions_t_fg = "green",
|
return ui.Line {
|
||||||
-- permissions_r_fg = "yellow",
|
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||||
-- permissions_w_fg = "red",
|
":",
|
||||||
-- permissions_x_fg = "cyan",
|
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||||
-- permissions_s_fg = "white",
|
" ",
|
||||||
|
}
|
||||||
|
end, 500, Status.RIGHT)
|
||||||
|
|
||||||
-- tab_width = 20,
|
Status:children_add(function(self)
|
||||||
-- tab_use_inverse = false,
|
local h = self._current.hovered
|
||||||
|
if h and h.link_to then
|
||||||
-- selected = { icon = "", fg = "yellow" },
|
return " -> " .. tostring(h.link_to)
|
||||||
-- copied = { icon = "", fg = "green" },
|
else
|
||||||
-- cut = { icon = "", fg = "red" },
|
return ""
|
||||||
|
end
|
||||||
-- total = { icon = "", fg = "yellow" },
|
end, 3300, Status.LEFT)
|
||||||
-- 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"}
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- })
|
|
||||||
|
|
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