diff --git a/README.md b/README.md index a6b294f3..ea71e388 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ Yazi (means "duck") is a terminal file manager written in Rust, based on non-blo - πŸ’ͺ **Powerful Async Task Scheduling and Management**: Provides real-time progress updates, task cancellation, and internal task priority assignment. - πŸ–ΌοΈ **Built-in Support for Multiple Image Protocols**: Also integrated with Überzug++, covering almost all terminals. - 🌟 **Built-in Code Highlighting and Image Decoding**: Combined with the pre-loading mechanism, greatly accelerates image and normal file loading. -- πŸ”Œ **Concurrent Plugin System**: UI plugins (rewriting most of the UI), functional plugins (coming soon), custom previewer, and custom preloader; Just some pieces of Lua. +- πŸ”Œ **Concurrent Plugin System**: UI plugins (rewriting most of the UI), functional plugins, custom previewer, and custom preloader; Just some pieces of Lua. - 🧰 Integration with fd, rg, fzf, zoxide -- πŸ’« Vim-like input/select component, auto-completion for cd paths -- 🏷️ Multi-Tab Support, Scrollable Preview (for videos, PDFs, archives, directories, code, etc.) +- πŸ’« Vim-like input/select/notify component, auto-completion for cd paths +- 🏷️ Multi-Tab Support, Cross-directory selection, Scrollable Preview (for videos, PDFs, archives, directories, code, etc.) - πŸ”„ Bulk Renaming, Visual Mode, File Chooser - 🎨 Theme System, Custom Layouts, Trash Bin, CSI u - ... and more! @@ -46,8 +46,9 @@ https://github.com/sxyazi/yazi/assets/17523360/92ff23fa-0cd5-4f04-b387-894c12265 | foot | [Sixel graphics format](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) | βœ… Built-in | | Ghostty | [Kitty old protocol](https://github.com/sxyazi/yazi/blob/main/yazi-adaptor/src/kitty_old.rs) | βœ… Built-in | | Black Box | [Sixel graphics format](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) | βœ… Built-in | -| Tabby | [Sixel graphics format](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) | βœ… Built-in | -| Hyper | [Sixel graphics format](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) | βœ… Built-in | +| VSCode | [Inline images protocol](https://iterm2.com/documentation-images.html) | βœ… Built-in | +| Tabby | [Inline images protocol](https://iterm2.com/documentation-images.html) | βœ… Built-in | +| Hyper | [Inline images protocol](https://iterm2.com/documentation-images.html) | βœ… Built-in | | X11 / Wayland | Window system protocol | β˜‘οΈ Überzug++ required | | Fallback | [Chafa](https://hpjansson.org/chafa/) | β˜‘οΈ Überzug++ required | diff --git a/yazi-adaptor/src/adaptor.rs b/yazi-adaptor/src/adaptor.rs index bc8b571d..d24c9abb 100644 --- a/yazi-adaptor/src/adaptor.rs +++ b/yazi-adaptor/src/adaptor.rs @@ -92,9 +92,9 @@ impl Adaptor { Emulator::Foot => vec![Self::Sixel], Emulator::Ghostty => vec![Self::KittyOld], Emulator::BlackBox => vec![Self::Sixel], - Emulator::VSCode => vec![Self::Sixel], - Emulator::Tabby => vec![Self::Sixel], - Emulator::Hyper => vec![Self::Sixel], + Emulator::VSCode => vec![Self::Iterm2, Self::Sixel], + Emulator::Tabby => vec![Self::Iterm2, Self::Sixel], + Emulator::Hyper => vec![Self::Iterm2, Self::Sixel], Emulator::Mintty => vec![Self::Iterm2], Emulator::Neovim => vec![], }; diff --git a/yazi-plugin/preset/plugins/archive.lua b/yazi-plugin/preset/plugins/archive.lua index 298c39f3..f50be750 100644 --- a/yazi-plugin/preset/plugins/archive.lua +++ b/yazi-plugin/preset/plugins/archive.lua @@ -3,7 +3,7 @@ local M = {} function M:peek() local _, bound = ya.preview_archive(self) if bound then - ya.manager_emit("peek", { tostring(bound), only_if = tostring(self.file.url), upper_bound = "" }) + ya.manager_emit("peek", { bound, only_if = tostring(self.file.url), upper_bound = true }) end end @@ -12,7 +12,7 @@ function M:seek(units) if h and h.url == self.file.url then local step = math.floor(units * self.area.h / 10) ya.manager_emit("peek", { - tostring(math.max(0, cx.active.preview.skip + step)), + math.max(0, cx.active.preview.skip + step), only_if = tostring(self.file.url), }) end diff --git a/yazi-plugin/preset/plugins/code.lua b/yazi-plugin/preset/plugins/code.lua index cba031e6..595ee7d8 100644 --- a/yazi-plugin/preset/plugins/code.lua +++ b/yazi-plugin/preset/plugins/code.lua @@ -3,7 +3,7 @@ local M = {} function M:peek() local _, bound = ya.preview_code(self) if bound then - ya.manager_emit("peek", { tostring(bound), only_if = tostring(self.file.url), upper_bound = "" }) + ya.manager_emit("peek", { bound, only_if = tostring(self.file.url), upper_bound = true }) end end @@ -12,7 +12,7 @@ function M:seek(units) if h and h.url == self.file.url then local step = math.floor(units * self.area.h / 10) ya.manager_emit("peek", { - tostring(math.max(0, cx.active.preview.skip + step)), + math.max(0, cx.active.preview.skip + step), only_if = tostring(self.file.url), }) end diff --git a/yazi-plugin/preset/plugins/folder.lua b/yazi-plugin/preset/plugins/folder.lua index 3948dfee..37b22112 100644 --- a/yazi-plugin/preset/plugins/folder.lua +++ b/yazi-plugin/preset/plugins/folder.lua @@ -8,7 +8,7 @@ function M:peek() local bound = math.max(0, #folder.files - self.area.h) if self.skip > bound then - ya.manager_emit("peek", { tostring(bound), only_if = tostring(self.file.url), upper_bound = "" }) + ya.manager_emit("peek", { bound, only_if = tostring(self.file.url), upper_bound = true }) end local items, markers = {}, {} @@ -37,7 +37,7 @@ function M:seek(units) local step = math.floor(units * self.area.h / 10) local bound = math.max(0, #folder.files - self.area.h) ya.manager_emit("peek", { - tostring(ya.clamp(0, cx.active.preview.skip + step, bound)), + ya.clamp(0, cx.active.preview.skip + step, bound), only_if = tostring(self.file.url), }) end diff --git a/yazi-plugin/preset/plugins/json.lua b/yazi-plugin/preset/plugins/json.lua index e504e929..04ab30d1 100644 --- a/yazi-plugin/preset/plugins/json.lua +++ b/yazi-plugin/preset/plugins/json.lua @@ -34,7 +34,7 @@ function M:peek() child:start_kill() if self.skip > 0 and i < self.skip + limit then - ya.manager_emit("peek", { tostring(math.max(0, i - limit)), only_if = tostring(self.file.url), upper_bound = "" }) + ya.manager_emit("peek", { math.max(0, i - limit), only_if = tostring(self.file.url), upper_bound = true }) else lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size)) ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) }) @@ -46,7 +46,7 @@ function M:seek(units) if h and h.url == self.file.url then local step = math.floor(units * self.area.h / 10) ya.manager_emit("peek", { - tostring(math.max(0, cx.active.preview.skip + step)), + math.max(0, cx.active.preview.skip + step), only_if = tostring(self.file.url), }) end @@ -55,7 +55,7 @@ end function M:fallback_to_builtin() local _, bound = ya.preview_code(self) if bound then - ya.manager_emit("peek", { tostring(bound), only_if = tostring(self.file.url), upper_bound = "" }) + ya.manager_emit("peek", { bound, only_if = tostring(self.file.url), upper_bound = true }) end end diff --git a/yazi-plugin/preset/plugins/pdf.lua b/yazi-plugin/preset/plugins/pdf.lua index e0f447d3..b10e086b 100644 --- a/yazi-plugin/preset/plugins/pdf.lua +++ b/yazi-plugin/preset/plugins/pdf.lua @@ -16,7 +16,7 @@ function M:seek(units) local h = cx.active.current.hovered if h and h.url == self.file.url then local step = ya.clamp(-1, units, 1) - ya.manager_emit("peek", { tostring(math.max(0, cx.active.preview.skip + step)), only_if = tostring(self.file.url) }) + ya.manager_emit("peek", { math.max(0, cx.active.preview.skip + step), only_if = tostring(self.file.url) }) end end @@ -37,7 +37,7 @@ function M:preload() elseif not output.status:success() then local pages = tonumber(output.stderr:match("the last page %((%d+)%)")) or 0 if self.skip > 0 and pages > 0 then - ya.manager_emit("peek", { tostring(math.max(0, pages - 1)), only_if = tostring(self.file.url), upper_bound = "" }) + ya.manager_emit("peek", { math.max(0, pages - 1), only_if = tostring(self.file.url), upper_bound = true }) end return 0 end diff --git a/yazi-plugin/preset/plugins/video.lua b/yazi-plugin/preset/plugins/video.lua index 3ad0e170..25d89a8c 100644 --- a/yazi-plugin/preset/plugins/video.lua +++ b/yazi-plugin/preset/plugins/video.lua @@ -16,7 +16,7 @@ function M:seek(units) local h = cx.active.current.hovered if h and h.url == self.file.url then ya.manager_emit("peek", { - tostring(math.max(0, cx.active.preview.skip + units)), + math.max(0, cx.active.preview.skip + units), only_if = tostring(self.file.url), }) end @@ -25,7 +25,7 @@ end function M:preload() local percentage = 5 + self.skip if percentage > 95 then - ya.manager_emit("peek", { "90", only_if = tostring(self.file.url), upper_bound = "" }) + ya.manager_emit("peek", { 90, only_if = tostring(self.file.url), upper_bound = true }) return 2 end