yazi: add plugins

This commit is contained in:
thek4n 2026-08-01 19:25:18 +03:00
parent fcacf4a84a
commit 3712da4322
6 changed files with 63 additions and 0 deletions

2
.gitignore vendored
View File

@ -50,3 +50,5 @@ home/user/.config/sway/variables.d/*
home/user/.config/alacritty/config.d/*
!home/user/.config/alacritty/config.d/.gitkeep
home/user/.config/yazi/plugins/

View File

@ -11,3 +11,5 @@ function Linemode:size_and_mtime()
local size = self._file:size()
return string.format("%s %s", size and ya.readable_size(size) or "-", time)
end
require("git"):setup()

View File

@ -2,3 +2,22 @@
on = [ "c", "e" ]
run = "shell -- flipbit x %h"
desc = "Toggle execution mode on file"
[[mgr.prepend_keymap]]
on = "M"
run = "plugin mount"
[[mgr.prepend_keymap]]
on = "F"
run = "plugin jump-to-char"
desc = "Jump to char"
[[mgr.prepend_keymap]]
on = "l"
run = "plugin smart-enter"
desc = "Enter the child directory, or open the file"
[[mgr.prepend_keymap]]
on = [ "c", "m" ]
run = "plugin chmod"
desc = "Chmod on selected files"

View File

@ -0,0 +1,27 @@
[[plugin.deps]]
use = "masaki39/git"
rev = "2f72da1"
hash = "ab9df3b5436af53de798d9d887bdadcd"
[[plugin.deps]]
use = "yazi-rs/plugins:mount"
rev = "bfdc423"
hash = "46cbdc05596a3ecd730b288e28c7079d"
[[plugin.deps]]
use = "yazi-rs/plugins:jump-to-char"
rev = "bfdc423"
hash = "7a4b4237223aaa94e589d1c01a23542a"
[[plugin.deps]]
use = "yazi-rs/plugins:smart-enter"
rev = "bfdc423"
hash = "187cc58ba7ac3befd49c342129e6f1b6"
[[plugin.deps]]
use = "yazi-rs/plugins:chmod"
rev = "bfdc423"
hash = "5b1c276b75cae91cbbdbe7863f39a540"
[flavor]
deps = []

View File

@ -19,3 +19,13 @@ edit = [
open = [
{ run = "xdg-open %s1", desc = "Open" },
]
[[plugin.prepend_fetchers]]
group = "git"
url = "*"
run = "git"
[[plugin.prepend_fetchers]]
group = "git"
url = "*/"
run = "git"

View File

@ -0,0 +1,3 @@
#!/bin/sh
ya pkg install