yazi plugin refactor and cache

This commit is contained in:
Matt Nish-Lapidus 2025-04-04 17:12:21 -04:00
parent 62a382f2f5
commit 561f1fcdd0
5 changed files with 101 additions and 96 deletions

View file

@ -457,6 +457,7 @@
pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-wlr
pkgs.gnome-keyring pkgs.gnome-keyring
pkgs.xdg-desktop-portal-termfilechooser
]; ];
}; };

View file

@ -69,7 +69,6 @@
fishPlugins.foreign-env fishPlugins.foreign-env
fishPlugins.fzf-fish fishPlugins.fzf-fish
fishPlugins.fifc
fishPlugins.bass fishPlugins.bass
fishPlugins.autopair fishPlugins.autopair
fishPlugins.forgit fishPlugins.forgit

View file

@ -40,12 +40,6 @@
rev = "HEAD"; rev = "HEAD";
sha256 = "sha256-JiUik4umi+ujsJmHliUbLsIj7ZTKayrWAAM8HmRdjwk="; sha256 = "sha256-JiUik4umi+ujsJmHliUbLsIj7ZTKayrWAAM8HmRdjwk=";
}; };
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "HEAD";
sha256 = "sha256-bhLUziCDnF4QDCyysRn7Az35RAy8ibZIVUzoPgyEO1A=";
};
restore = pkgs.fetchFromGitHub { restore = pkgs.fetchFromGitHub {
owner = "boydaihungst"; owner = "boydaihungst";
repo = "restore.yazi"; repo = "restore.yazi";
@ -64,6 +58,19 @@
rev = "HEAD"; rev = "HEAD";
sha256 = "sha256-7X8uAiJ8vBXYBXOgyKhVVikOnTBGrdCcXOJemjQNolI="; sha256 = "sha256-7X8uAiJ8vBXYBXOgyKhVVikOnTBGrdCcXOJemjQNolI=";
}; };
rich-preview = pkgs.fetchFromGitHub {
owner = "AnirudhG07";
repo = "rich-preview.yazi";
rev = "HEAD";
sha256 = "sha256-dW2gAAv173MTcQdqMV32urzfrsEX6STR+oCJoRVGGpA=";
};
mediainfo= pkgs.fetchFromGitHub {
owner = "boydaihungst";
repo = "mediainfo.yazi";
rev = "HEAD";
sha256 = "sha256-U6rr3TrFTtnibrwJdJ4rN2Xco4Bt4QbwEVUTNXlWRps=";
};
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;
}; };
@ -183,5 +190,4 @@
xdg.configFile."yazi/theme.toml".source = ./yazi/theme.toml; xdg.configFile."yazi/theme.toml".source = ./yazi/theme.toml;
xdg.configFile."yazi/flavors".source = ./yazi/flavors; xdg.configFile."yazi/flavors".source = ./yazi/flavors;
# xdg.configFile."yazi/plugins".source = ./yazi/plugins;
} }

View file

@ -1,99 +1,93 @@
-- 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 = "" },
require("starship"):setup { -- style_a = {
config_file = "~/.config/starship.toml", -- fg = "black",
} -- bg_mode = {
-- normal = "white",
-- select = "brightyellow",
-- un_set = "brightred"
-- }
-- },
-- style_b = { bg = "#111111", fg = "brightwhite" },
-- style_c = { bg = "#111111", fg = "brightwhite" },
require("yatline"):setup({ -- permissions_t_fg = "green",
--theme = my_theme, -- permissions_r_fg = "yellow",
section_separator = { open = "", close = "" }, -- permissions_w_fg = "red",
part_separator = { open = "", close = "" }, -- permissions_x_fg = "cyan",
inverse_separator = { open = "", close = "" }, -- permissions_s_fg = "white",
style_a = { -- tab_width = 20,
fg = "black", -- tab_use_inverse = false,
bg_mode = {
normal = "white",
select = "brightyellow",
un_set = "brightred"
}
},
style_b = { bg = "#111111", fg = "brightwhite" },
style_c = { bg = "#111111", fg = "brightwhite" },
permissions_t_fg = "green", -- selected = { icon = "󰻭", fg = "yellow" },
permissions_r_fg = "yellow", -- copied = { icon = "", fg = "green" },
permissions_w_fg = "red", -- cut = { icon = "", fg = "red" },
permissions_x_fg = "cyan",
permissions_s_fg = "white",
tab_width = 20, -- total = { icon = "󰮍", fg = "yellow" },
tab_use_inverse = false, -- succ = { icon = "", fg = "green" },
-- fail = { icon = "", fg = "red" },
-- found = { icon = "󰮕", fg = "blue" },
-- processed = { icon = "󰐍", fg = "green" },
selected = { icon = "󰻭", fg = "yellow" }, -- show_background = true,
copied = { icon = "", fg = "green" },
cut = { icon = "", fg = "red" },
total = { icon = "󰮍", fg = "yellow" }, -- display_header_line = true,
succ = { icon = "", fg = "green" }, -- display_status_line = true,
fail = { icon = "", fg = "red" },
found = { icon = "󰮕", fg = "blue" },
processed = { icon = "󰐍", fg = "green" },
show_background = true, -- component_positions = { "header", "tab", "status" },
display_header_line = true, -- -- header_line = {
display_status_line = true, -- -- left = {
-- -- section_a = {
-- -- {type = "line", custom = false, name = "tabs", params = {"left"}},
-- -- },
-- -- section_b = {
-- -- },
-- -- section_c = {
-- -- }
-- -- },
-- -- right = {
-- -- section_a = {
-- -- },
-- -- section_b = {
-- -- },
-- -- section_c = {
-- -- }
-- -- }
-- -- },
component_positions = { "header", "tab", "status" }, -- status_line = {
-- left = {
header_line = { -- section_a = {
left = { -- {type = "string", custom = false, name = "tab_mode"},
section_a = { -- },
{type = "line", custom = false, name = "tabs", params = {"left"}}, -- section_b = {
}, -- {type = "string", custom = false, name = "hovered_size"},
section_b = { -- },
}, -- section_c = {
section_c = { -- {type = "string", custom = false, name = "hovered_path"},
} -- { type = "coloreds", custom = false, name = "symlink" },
}, -- {type = "coloreds", custom = false, name = "count"},
right = { -- }
section_a = { -- },
}, -- right = {
section_b = { -- section_a = {
}, -- {type = "string", custom = false, name = "cursor_position"},
section_c = { -- },
} -- section_b = {
} -- {type = "string", custom = false, name = "cursor_percentage"},
}, -- },
-- section_c = {
status_line = { -- {type = "string", custom = false, name = "hovered_file_extension", params = {true}},
left = { -- {type = "coloreds", custom = false, name = "permissions"},
section_a = { -- {type = "string", custom = false, name = "hovered_ownership"}
{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"}
}
}
}
})

View file

@ -1,2 +1,7 @@
[flavor] [flavor]
dark = "onedark" dark = "onedark"
[status]
overall = { bg = "#282C34" }
sep_left = { open = "", close = "" }
sep_right = { open = "", close = "" }