1
0
Fork 0

update lua config

This commit is contained in:
Peter Domínguez 2025-06-01 12:04:00 -04:00
parent 768e4e1b9e
commit e474f94fb6
14 changed files with 417 additions and 66 deletions

View file

@ -7,7 +7,7 @@ https://github.com/yazi-rs/plugins/assets/17523360/7aa3abc2-d057-498c-8473-a6282
## Installation
```sh
ya pack -a yazi-rs/plugins:chmod
ya pkg add yazi-rs/plugins:chmod
```
## Usage
@ -15,7 +15,7 @@ ya pack -a yazi-rs/plugins:chmod
Add this to your `~/.config/yazi/keymap.toml`:
```toml
[[manager.prepend_keymap]]
[[mgr.prepend_keymap]]
on = [ "c", "m" ]
run = "plugin chmod"
desc = "Chmod on selected files"

View file

@ -1,4 +1,4 @@
--- @since 25.2.26
--- @since 25.5.28
local selected_or_hovered = ya.sync(function()
local tab, paths = cx.active, {}
@ -13,7 +13,7 @@ end)
return {
entry = function()
ya.mgr_emit("escape", { visual = true })
ya.emit("escape", { visual = true })
local urls = selected_or_hovered()
if #urls == 0 then
@ -28,7 +28,7 @@ return {
return
end
local status, err = Command("chmod"):arg(value):args(urls):spawn():wait()
local status, err = Command("chmod"):arg(value):arg(urls):spawn():wait()
if not status or not status.success then
ya.notify {
title = "Chmod",