Adds yazi

This commit is contained in:
Michel Fedde 2025-02-23 22:36:48 +01:00
parent 9c0d6169ec
commit 04e5f213d4
6 changed files with 158 additions and 1 deletions

View file

@ -18,4 +18,5 @@
<property name="last-show-hidden" type="bool" value="true"/>
<property name="misc-expandable-folders" type="bool" value="true"/>
<property name="last-splitview-separator-position" type="int" value="-1"/>
<property name="last-renamer-dialog-maximized" type="bool" value="true"/>
</channel>

95
.config/yazi/init.lua Normal file
View file

@ -0,0 +1,95 @@
require("yatline"):setup({
--theme = my_theme,
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 = "brightblack", fg = "brightwhite" },
style_c = { bg = "black", fg = "brightwhite" },
permissions_t_fg = "green",
permissions_r_fg = "yellow",
permissions_w_fg = "red",
permissions_x_fg = "cyan",
permissions_s_fg = "white",
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 = {
{ type = "string", custom = false, name = "date", params = { "%A, %d %B %Y" } },
},
section_b = {
{ type = "string", custom = false, name = "date", params = { "%X" } },
},
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 = "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" },
},
},
},
})
require("fuse-archive"):setup({
smart_enter = true,
mount_dir = "/tmp",
})
require("git"):setup()

View file

@ -1,9 +1,19 @@
[manager]
prepend_keymap = [
{ on = [ "<Space>", "m" ], run = "plugin mount", desc = "Displays mount dialog"},
{ on = [ "<Space>", 's'], run = "plugin what-size", desc = "Calc size of selection or cwd" },
{ on = [ "<Space>", '<S-s>'], run = "plugin what-size --args='--clipboard'", desc = "Calc size of selection or cwd" },
{ on = ["<Space>", 'c'], desc = "Archive selected files", run = "plugin compress"},
{ on = ["<Space>", "<Space>"], desc = "Jump with zoxide", run = "plugin zoxide" },
{ on = "<S-l>", desc = "Move to the tab on the left", run = "tab_switch 1 --relative" },
{ on = "<S-h>", desc = "Move to the tab on the right", run = "tab_switch -1 --relative" },
{ on = ["<Space>", 'z'], desc = "Zip the selected files", run = "shell '7z a .zip \"$@\"' --interactive --cursor=5"}
{ on = ["c", 'm'], desc = "Change file mod", run = "plugin chmod"},
{ on = [ "l" ], run = "plugin fuse-archive mount", desc = "Enter or Mount selected archive" },
{ on = [ "h" ], run = "plugin fuse-archive unmount", desc = "Leave or Unmount selected archive" },
]
append_keymap = [
{ on = ['c', 'v'], desc = "Drag selected files", run = "shell 'blobdrop -b \"$@\"'" },
{ on = ['c', 'y'], desc = "Copy file/files to wl-clipboard", run = "plugin wl-clipboard"}
]

42
.config/yazi/package.toml Normal file
View file

@ -0,0 +1,42 @@
[[plugin.deps]]
use = "imsi32/yatline"
rev = "9328205"
hash = "3e51d1fd8a2e481fcfa8eab1251d1c5f"
[[plugin.deps]]
use = "yazi-rs/plugins:mount"
rev = "5186af7"
hash = "5c4d8080367dd2561a18c1cf5a1dd295"
[[plugin.deps]]
use = "pirafrank/what-size"
rev = "b23e3a4"
hash = "98e5f5af3efd3ba8bc2db0720187cc83"
[[plugin.deps]]
use = "dawsers/fuse-archive"
rev = "a58327c"
hash = "6a6d24880ce7666048fb81ad758c48d3"
[[plugin.deps]]
use = "KKV9/compress"
rev = "60b24af"
hash = "ee025be766240cc98e671754ac836da3"
[[plugin.deps]]
use = "yazi-rs/plugins:git"
rev = "5186af7"
hash = "771f18427fb75fb19990ce602bb322f4"
[[plugin.deps]]
use = "grappas/wl-clipboard"
rev = "c4edc4f"
hash = "51ff959c3c26cb3889589a0f8d394f14"
[[plugin.deps]]
use = "yazi-rs/plugins:chmod"
rev = "5186af7"
hash = "f28138c2e11e87962b66d583fef724c3"
[flavor]
deps = []

8
.config/yazi/yazi.toml Normal file
View file

@ -0,0 +1,8 @@
[opener]
extract = []
[plugin]
prepend_fetchers = [
{ id = "git", name = "*", run = "git" },
{ id = "git", name = "*/", run = "git" }
]