diff --git a/README.md b/README.md index ee8424b..0a5b948 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # Plugins -The following plugins can be installed using the [`ya pack` package manager](https://yazi-rs.github.io/docs/cli#package-manager) introduced in Yazi v0.3. +The following plugins can be installed using the [`ya pkg` package manager](https://yazi-rs.github.io/docs/cli#package-manager) introduced in Yazi v25.5.28. For specific installation commands and configuration instructions, check the individual `README.md` of each plugin by clicking the link below: diff --git a/chmod.yazi/README.md b/chmod.yazi/README.md index e8a6614..b2ad136 100644 --- a/chmod.yazi/README.md +++ b/chmod.yazi/README.md @@ -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" diff --git a/diff.yazi/README.md b/diff.yazi/README.md index 54faeb3..1976541 100644 --- a/diff.yazi/README.md +++ b/diff.yazi/README.md @@ -7,7 +7,7 @@ https://github.com/yazi-rs/plugins/assets/17523360/eff5e949-386a-44ea-82f9-4cb4a ## Installation ```sh -ya pack -a yazi-rs/plugins:diff +ya pkg add yazi-rs/plugins:diff ``` ## Usage @@ -15,7 +15,7 @@ ya pack -a yazi-rs/plugins:diff Add this to your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "" run = "plugin diff" desc = "Diff the selected with the hovered file" diff --git a/full-border.yazi/README.md b/full-border.yazi/README.md index 6e78bd4..269ca8e 100644 --- a/full-border.yazi/README.md +++ b/full-border.yazi/README.md @@ -7,7 +7,7 @@ Add a full border to Yazi to make it look fancier. ## Installation ```sh -ya pack -a yazi-rs/plugins:full-border +ya pkg add yazi-rs/plugins:full-border ``` ## Usage diff --git a/full-border.yazi/main.lua b/full-border.yazi/main.lua index abb1c3e..a917e1e 100644 --- a/full-border.yazi/main.lua +++ b/full-border.yazi/main.lua @@ -7,10 +7,10 @@ local function setup(_, opts) Tab.build = function(self, ...) local bar = function(c, x, y) if x <= 0 or x == self._area.w - 1 or th.mgr.border_symbol ~= "│" then - return ui.Bar(ui.Bar.TOP) + return ui.Bar(ui.Edge.TOP) end - return ui.Bar(ui.Bar.TOP) + return ui.Bar(ui.Edge.TOP) :area( ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) } ) @@ -26,9 +26,9 @@ local function setup(_, opts) local style = th.mgr.border_style self._base = ya.list_merge(self._base or {}, { - ui.Border(ui.Border.ALL):area(self._area):type(type):style(style), - ui.Bar(ui.Bar.RIGHT):area(self._chunks[1]):style(style), - ui.Bar(ui.Bar.LEFT):area(self._chunks[3]):style(style), + ui.Border(ui.Edge.ALL):area(self._area):type(type):style(style), + ui.Bar(ui.Edge.RIGHT):area(self._chunks[1]):style(style), + ui.Bar(ui.Edge.LEFT):area(self._chunks[3]):style(style), bar("┬", c[1].right - 1, c[1].y), bar("┴", c[1].right - 1, c[1].bottom - 1), diff --git a/git.yazi/README.md b/git.yazi/README.md index c58e614..f1848e9 100644 --- a/git.yazi/README.md +++ b/git.yazi/README.md @@ -7,7 +7,7 @@ https://github.com/user-attachments/assets/34976be9-a871-4ffe-9d5a-c4cdd0bf4576 ## Installation ```sh -ya pack -a yazi-rs/plugins:git +ya pkg add yazi-rs/plugins:git ``` ## Setup diff --git a/jump-to-char.yazi/README.md b/jump-to-char.yazi/README.md index 4c8cdbb..d24f2e7 100644 --- a/jump-to-char.yazi/README.md +++ b/jump-to-char.yazi/README.md @@ -7,7 +7,7 @@ https://github.com/yazi-rs/plugins/assets/17523360/aac9341c-b416-4e0c-aaba-889d4 ## Installation ```sh -ya pack -a yazi-rs/plugins:jump-to-char +ya pkg add yazi-rs/plugins:jump-to-char ``` ## Usage @@ -15,7 +15,7 @@ ya pack -a yazi-rs/plugins:jump-to-char Add this to your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "f" run = "plugin jump-to-char" desc = "Jump to char" diff --git a/lsar.yazi/README.md b/lsar.yazi/README.md index 365417f..e944442 100644 --- a/lsar.yazi/README.md +++ b/lsar.yazi/README.md @@ -10,7 +10,7 @@ but we strongly discourage using it unless you encounter some issues with `7zip` ## Installation ```sh -ya pack -a yazi-rs/plugins:lsar +ya pkg add yazi-rs/plugins:lsar ``` ## Usage diff --git a/mactag.yazi/README.md b/mactag.yazi/README.md index d3c49fc..e5c060b 100644 --- a/mactag.yazi/README.md +++ b/mactag.yazi/README.md @@ -11,7 +11,7 @@ https://github.com/user-attachments/assets/7f26dc6d-67a5-4a85-a99e-4671ece9ae56 Install the plugin itself, and [jdberry/tag](https://github.com/jdberry/tag) used to tag files: ```sh -ya pack -a yazi-rs/plugins:mactag +ya pkg add yazi-rs/plugins:mactag brew update && brew install tag ``` @@ -63,12 +63,12 @@ Besides displaying tags attached to files, you can also add or remove tags withi Add following keybindings to your `~/.config/yazi/keymap.toml` to enable it: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = [ "b", "a" ] run = "plugin mactag add" desc = "Tag selected files" -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = [ "b", "r" ] run = "plugin mactag remove" desc = "Untag selected files" diff --git a/mime-ext.yazi/README.md b/mime-ext.yazi/README.md index e771576..3c2ee1f 100644 --- a/mime-ext.yazi/README.md +++ b/mime-ext.yazi/README.md @@ -7,7 +7,7 @@ See https://yazi-rs.github.io/docs/tips#make-yazi-even-faster for more informati ## Installation ```sh -ya pack -a yazi-rs/plugins:mime-ext +ya pkg add yazi-rs/plugins:mime-ext ``` ## Usage diff --git a/mount.yazi/README.md b/mount.yazi/README.md index c2cfd71..ff7f110 100644 --- a/mount.yazi/README.md +++ b/mount.yazi/README.md @@ -12,7 +12,7 @@ https://github.com/user-attachments/assets/c6f780ab-458b-420f-85cf-2fc45fcfe3a2 ## Installation ```sh -ya pack -a yazi-rs/plugins:mount +ya pkg add yazi-rs/plugins:mount ``` ## Usage @@ -20,7 +20,7 @@ ya pack -a yazi-rs/plugins:mount Add this to your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "M" run = "plugin mount" ``` diff --git a/mount.yazi/main.lua b/mount.yazi/main.lua index e933a29..87c7313 100644 --- a/mount.yazi/main.lua +++ b/mount.yazi/main.lua @@ -155,11 +155,11 @@ function M:redraw() return { ui.Clear(self._area), - ui.Border(ui.Border.ALL) + ui.Border(ui.Edge.ALL) :area(self._area) :type(ui.Border.ROUNDED) :style(ui.Style():fg("blue")) - :title(ui.Line("Mount"):align(ui.Line.CENTER)), + :title(ui.Line("Mount"):align(ui.Align.CENTER)), ui.Table(rows) :area(self._area:pad(ui.Pad(1, 2, 1, 2))) :header(ui.Row({ "Src", "Label", "Dist", "FSType" }):style(ui.Style():bold())) diff --git a/no-status.yazi/README.md b/no-status.yazi/README.md index f02a4ec..9238b89 100644 --- a/no-status.yazi/README.md +++ b/no-status.yazi/README.md @@ -7,7 +7,7 @@ Remove the status bar. ## Installation ```sh -ya pack -a yazi-rs/plugins:no-status +ya pkg add yazi-rs/plugins:no-status ``` ## Usage diff --git a/piper.yazi/README.md b/piper.yazi/README.md index c16e564..1cb238f 100644 --- a/piper.yazi/README.md +++ b/piper.yazi/README.md @@ -5,7 +5,7 @@ Pipe any shell command as a previewer. ## Installation ```sh -ya pack -a yazi-rs/plugins:piper +ya pkg add yazi-rs/plugins:piper ``` ## Usage diff --git a/piper.yazi/main.lua b/piper.yazi/main.lua index 0096daf..cc2646c 100644 --- a/piper.yazi/main.lua +++ b/piper.yazi/main.lua @@ -2,11 +2,7 @@ local M = {} -local function fail(job, s) - ya.preview_widgets(job, { - ui.Text.parse(s):area(job.area):wrap(ui.Text.WRAP), - }) -end +local function fail(job, s) ya.preview_widget(job, ui.Text.parse(s):area(job.area):wrap(ui.Wrap.YES)) end function M:peek(job) local child, err = Command("sh") @@ -43,7 +39,7 @@ function M:peek(job) elseif job.skip > 0 and i < job.skip + limit then ya.emit("peek", { math.max(0, i - limit), only_if = job.file.url, upper_bound = true }) else - ya.preview_widgets(job, { M.format(job, outs) }) + ya.preview_widget(job, M.format(job, outs)) end end diff --git a/smart-enter.yazi/README.md b/smart-enter.yazi/README.md index d4c6bbd..742f2e1 100644 --- a/smart-enter.yazi/README.md +++ b/smart-enter.yazi/README.md @@ -5,7 +5,7 @@ ## Installation ```sh -ya pack -a yazi-rs/plugins:smart-enter +ya pkg add yazi-rs/plugins:smart-enter ``` ## Usage @@ -13,7 +13,7 @@ ya pack -a yazi-rs/plugins:smart-enter Bind your l key to the plugin, in your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "l" run = "plugin smart-enter" desc = "Enter the child directory, or open the file" @@ -36,5 +36,5 @@ require("smart-enter"):setup { This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. -[open]: https://yazi-rs.github.io/docs/configuration/keymap/#manager.open -[enter]: https://yazi-rs.github.io/docs/configuration/keymap/#manager.enter +[open]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.open +[enter]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.enter diff --git a/smart-filter.yazi/README.md b/smart-filter.yazi/README.md index 8ac4c09..97be2ac 100644 --- a/smart-filter.yazi/README.md +++ b/smart-filter.yazi/README.md @@ -7,7 +7,7 @@ https://github.com/yazi-rs/plugins/assets/17523360/72aaf117-1378-4f7e-93ba-d425a ## Installation ```sh -ya pack -a yazi-rs/plugins:smart-filter +ya pkg add yazi-rs/plugins:smart-filter ``` ## Usage @@ -15,7 +15,7 @@ ya pack -a yazi-rs/plugins:smart-filter Add this to your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "F" run = "plugin smart-filter" desc = "Smart filter" diff --git a/smart-paste.yazi/README.md b/smart-paste.yazi/README.md index 6843b0e..b32f475 100644 --- a/smart-paste.yazi/README.md +++ b/smart-paste.yazi/README.md @@ -7,7 +7,7 @@ https://github.com/user-attachments/assets/b3f6348e-abbe-42fe-9a67-a96e68f11255 ## Installation ```sh -ya pack -a yazi-rs/plugins:smart-paste +ya pkg add yazi-rs/plugins:smart-paste ``` ## Usage @@ -15,7 +15,7 @@ ya pack -a yazi-rs/plugins:smart-paste Add this to your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "p" run = "plugin smart-paste" desc = "Paste into the hovered directory or CWD" diff --git a/sudo-demo.yazi/README.md b/sudo-demo.yazi/README.md index ee9b9d8..8068691 100644 --- a/sudo-demo.yazi/README.md +++ b/sudo-demo.yazi/README.md @@ -5,7 +5,7 @@ Just an example showing how to use `sudo` in a Yazi plugin, and the plugin itsel ## Installation ```sh -ya pack -a yazi-rs/plugins:sudo-demo +ya pkg add yazi-rs/plugins:sudo-demo ``` ## Usage @@ -13,7 +13,7 @@ ya pack -a yazi-rs/plugins:sudo-demo Add this to your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "" run = "plugin sudo-demo" ``` diff --git a/toggle-pane.yazi/README.md b/toggle-pane.yazi/README.md index d00c169..3ef4095 100644 --- a/toggle-pane.yazi/README.md +++ b/toggle-pane.yazi/README.md @@ -1,6 +1,6 @@ # toggle-pane.yazi -Toggle the show, hide, and maximize states for different panes: parent, current, and preview. It respects the user's [`ratio` settings](https://yazi-rs.github.io/docs/configuration/yazi#manager.ratio)! +Toggle the show, hide, and maximize states for different panes: parent, current, and preview. It respects the user's [`ratio` settings](https://yazi-rs.github.io/docs/configuration/yazi#mgr.ratio)! Assume the user's `ratio` is $$[A, B, C]$$, that is, $$\text{parent}=A, \text{current}=B, \text{preview}=C$$: @@ -15,7 +15,7 @@ Assume the user's `ratio` is $$[A, B, C]$$, that is, $$\text{parent}=A, \text{cu ## Installation ```sh -ya pack -a yazi-rs/plugins:toggle-pane +ya pkg add yazi-rs/plugins:toggle-pane ``` ## Usage @@ -24,7 +24,7 @@ Hide/Show preview: ```toml # keymap.toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "T" run = "plugin toggle-pane min-preview" desc = "Show or hide the preview pane" @@ -34,7 +34,7 @@ Maximize/Restore preview: ```toml # keymap.toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "T" run = "plugin toggle-pane max-preview" desc = "Maximize or restore the preview pane" diff --git a/toggle-pane.yazi/main.lua b/toggle-pane.yazi/main.lua index b408692..6f914bd 100644 --- a/toggle-pane.yazi/main.lua +++ b/toggle-pane.yazi/main.lua @@ -39,13 +39,7 @@ local function entry(st, job) Tab.layout, st.old = st.old, nil st.parent, st.current, st.preview = nil, nil, nil end - - -- TODO: remove this in the future - if ya.emit then - ya.emit("app:resize", {}) - else - ya.app_emit("resize", {}) - end + ya.emit("app:resize", {}) end return { entry = entry } diff --git a/types.yazi/README.md b/types.yazi/README.md index 34ebee5..ae7f954 100644 --- a/types.yazi/README.md +++ b/types.yazi/README.md @@ -5,7 +5,7 @@ Type definitions for Yazi's Lua API, empowering an efficient plugin development ## Installation ```sh -ya pack -a yazi-rs/plugins:types +ya pkg add yazi-rs/plugins:types ``` ## Usage diff --git a/vcs-files.yazi/README.md b/vcs-files.yazi/README.md index a86dccf..4888134 100644 --- a/vcs-files.yazi/README.md +++ b/vcs-files.yazi/README.md @@ -7,14 +7,14 @@ https://github.com/user-attachments/assets/465b801b-3516-4f57-be09-8405da21e34d ## Installation ```sh -ya pack -a yazi-rs/plugins:vcs-files +ya pkg add yazi-rs/plugins:vcs-files ``` ## Usage ```toml # keymap.toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = [ "g", "c" ] run = "plugin vcs-files" desc = "Show Git file changes"