This media is not supported in your browser
VIEW IN TELEGRAM
重大更新:Yazi 现在支持鼠标了
插件系统为每个组件新增了 click/scroll/touch/move/drag 五个 API 用于处理鼠标事件,并为它们提供了默认实现以覆盖常见操作。
另一方面,这将允许插件开发者扩展光标的行为,实现他们自己想要的任何功能。
https://github.com/sxyazi/yazi/pull/1038 谢谢 @qsdrqs 为此所做的工作!
插件系统为每个组件新增了 click/scroll/touch/move/drag 五个 API 用于处理鼠标事件,并为它们提供了默认实现以覆盖常见操作。
另一方面,这将允许插件开发者扩展光标的行为,实现他们自己想要的任何功能。
https://github.com/sxyazi/yazi/pull/1038 谢谢 @qsdrqs 为此所做的工作!
👍10
一老哥给 Yazi 录了个视频,好喜欢这种 vlog 风格,让我惊讶的是,竟然是在深圳录的,而且中文发音也好棒!
他说后面会尝试纯中文的视频,我觉得这个风格很适合他,期待他的新作品!
https://www.youtube.com/watch?v=cUwu3mkrz_k
他说后面会尝试纯中文的视频,我觉得这个风格很适合他,期待他的新作品!
https://www.youtube.com/watch?v=cUwu3mkrz_k
YouTube
Yazi, the terminal file manager you didn't know you needed (why I switched from LF)
Check out Yazi for yourself: yazi-rs.github.io
Linux to me is not just a hobby, but something that I actively use every day. Thus, I want the programs I use to be functional, extensible, and stylish. I believe Yazi accomplishes all these goals.
My github:…
Linux to me is not just a hobby, but something that I actively use every day. Thus, I want the programs I use to be functional, extensible, and stylish. I believe Yazi accomplishes all these goals.
My github:…
👍7
This media is not supported in your browser
VIEW IN TELEGRAM
最近一直在用我写的这个
昨天把它开源了,不到 50 行代码,https://github.com/yazi-rs/plugins/tree/main/smart-filter.yazi
smart-filter.yazi 插件导航文件,发现效率提升不少,而且简单易用,简直完美。昨天把它开源了,不到 50 行代码,https://github.com/yazi-rs/plugins/tree/main/smart-filter.yazi
👍7
今日踩坑
https://github.com/sxyazi/yazi/issues/1320#issuecomment-2241556624
https://github.com/notify-rs/notify/pull/602
notify-rs 有个 UB,Rust 版本一升 1.78.0 就 crash。原因从
https://github.com/sxyazi/yazi/issues/1320#issuecomment-2241556624
https://github.com/notify-rs/notify/pull/602
notify-rs 有个 UB,Rust 版本一升 1.78.0 就 crash。原因从
isize transmute 成 Box 没先 cast 成 *mut。GitHub
Permanently deleting folder crashes on Windows · Issue #1320 · sxyazi/yazi
What system are you running Yazi on? Windows What terminal are you running Yazi in? Windows Terminal yazi --debug output ##### ↓↓↓ Paste the output here: ↓↓↓ ##### Yazi Version: 0.2.5 (66e83f3 2024...
❤1
抛弃 Alacritty 转向 kitty 的原因竟然是 - 为了能让 Yazi 显示图像😄
https://www.youtube.com/watch?v=BeSUAEZIf9A
IMHO,不支持图像的终端都不值得用,人家 VT200 系列早在 1983 就支持的东西,一些现代终端却拒绝添加它,这完全是技术的退步。
很高兴看到越来越多人逐渐抛弃 Alacritty 转向其它终端。
https://www.youtube.com/watch?v=BeSUAEZIf9A
IMHO,不支持图像的终端都不值得用,人家 VT200 系列早在 1983 就支持的东西,一些现代终端却拒绝添加它,这完全是技术的退步。
很高兴看到越来越多人逐渐抛弃 Alacritty 转向其它终端。
YouTube
I'm ditching Alacritty. Here's why
X: https://twitter.com/typecraft_dev
Learn is 50% off! https://learn.typecraft.dev
Alacritty is a great terminal emulator. But there is a feature that I need from my terminal that alacritty didn't support. So I am switching my terminal emulator to a different…
Learn is 50% off! https://learn.typecraft.dev
Alacritty is a great terminal emulator. But there is a feature that I need from my terminal that alacritty didn't support. So I am switching my terminal emulator to a different…
👍6
Yazi 终端文件管理器 v0.3 发布!
经过 3 个月开发,很高兴宣布 Yazi 0.3 今天正式发布。
这个版本带来了许多新功能和改善,像是:
• 鼠标支持
• 新解压插件
• 字体、SVG、HEIC、JPEG XL 预览支持
• 包管理器
• 重新设计图标
• 归档预览性能大提升
请阅读 https://github.com/sxyazi/yazi/releases/tag/v0.3.0 捕捉所有细节。
经过 3 个月开发,很高兴宣布 Yazi 0.3 今天正式发布。
这个版本带来了许多新功能和改善,像是:
• 鼠标支持
• 新解压插件
• 字体、SVG、HEIC、JPEG XL 预览支持
• 包管理器
• 重新设计图标
• 归档预览性能大提升
请阅读 https://github.com/sxyazi/yazi/releases/tag/v0.3.0 捕捉所有细节。
🎉18
This media is not supported in your browser
VIEW IN TELEGRAM
社区老哥给 Yazi 写了个受 React 启发的 Panes 系统 - 包含了常见的 Rows、Columns、Boxes 部件,每个部件都是一个函数并可以被自由组合和定制(content,padding,margin,borders 等)。
他在 Yazi 的 Discord server 分享了它,看完之后非常震惊,因为默认 UI 被 100% 重写了,并多了一堆新功能(双列布局、尺寸调整、横纵布局切换、窗格选择模式),刚开始我甚至没认出来这是 Yazi。
很开心看到这样的插件出现,也真的很惊讶社区的创造力,目前仍然处于测试阶段,不过有个很棒的演示视频:
他在 Yazi 的 Discord server 分享了它,看完之后非常震惊,因为默认 UI 被 100% 重写了,并多了一堆新功能(双列布局、尺寸调整、横纵布局切换、窗格选择模式),刚开始我甚至没认出来这是 Yazi。
很开心看到这样的插件出现,也真的很惊讶社区的创造力,目前仍然处于测试阶段,不过有个很棒的演示视频:
👍17
🌸
想给 Yazi 适配个 Mintty 图片预览,对,就是 Git Bash 带的那个终端。但图片位置一直是错的,在对线长达两周后,仍没丝毫进展,中途还发现个 Mintty bug,https://github.com/mintty/mintty/issues/1228 但在昨天一位 microsoft/terminal 贡献者提醒下,加了个 sleep,竟然就 work 了!!! 我们至今也没搞明白是哪出了问题,Mintty?Cygwin?ConPTY?不清楚,只有天知道。 在同样基于 ConPTY…
又被这位大哥救了一命,感激!❤️️
https://github.com/sxyazi/yazi/issues/1557#issuecomment-2340294607
tmux 和 ConPTY 是 CLI 开发永远的噩梦,越来越理解为啥 kitty 作者那么反感 tmux 了😭
https://github.com/sxyazi/yazi/issues/1557#issuecomment-2340294607
tmux 和 ConPTY 是 CLI 开发永远的噩梦,越来越理解为啥 kitty 作者那么反感 tmux 了😭
🤯8👎1
草,之前为了偷懒简单加的一个
https://www.reddit.com/r/programmingcirclejerk/comments/1fu8ori/run_arrow_99999999_desc_move_cursor_to_the_top/
arrow -99999999(光标移到开始),被人当段子发到 Reddit 上了🙃https://www.reddit.com/r/programmingcirclejerk/comments/1fu8ori/run_arrow_99999999_desc_move_cursor_to_the_top/
Reddit
From the programmingcirclejerk community on Reddit: { [...] run = "arrow -99999999", desc = "Move cursor to the top" },
Explore this post and more from the programmingcirclejerk community
🤣12
Rust std::fs::copy() 平台差异记录
这个问题只存在于 Linux/Android,因为 Linux 没有像 macOS 的
而文件能在所有 FS 复制是预期行为,因此对于 Linux/Android,我会
需要注意的是,对于 macOS,当前实现,
TLDR:为了让文件在所有 FS 都能复制,并且保留 CoW,Linux/Android 使用
https://www.reddit.com/r/rust/comments/57cmm1/weird_behavior_of_stdfscopy_on_networkmounted/
fs::copy() 和 io::copy() 不同,除了复制文件本身,还会复制文件权限,但一些(网络)文件系统不支持设置权限 - Operation not supported (os error 95),这会导致文件也没法复制。这个问题只存在于 Linux/Android,因为 Linux 没有像 macOS 的
fclonefileat、fcopyfile,Windows 的 CopyFileEx 一个 syscall 搞定整个复制的 API,因此需要将一个原子操作拆成 2 个,Rust 为了保证安全,之中任何一个失败都视为整体失败。而文件能在所有 FS 复制是预期行为,因此对于 Linux/Android,我会
io::copy() + 静默 fchmod。strace 了下它和 fs::copy() 一致,这意味着它仍然会尝试 copy_file_range,不会损失 CoW FS 的优势。需要注意的是,对于 macOS,当前实现,
io::copy() 就只是个 userspace read-write-loop,所以 macOS 应该仍然使用 fs::copy(),反正也不存在这个问题。TLDR:为了让文件在所有 FS 都能复制,并且保留 CoW,Linux/Android 使用
io::copy() + fchmod,其它使用 fs::copy()。https://www.reddit.com/r/rust/comments/57cmm1/weird_behavior_of_stdfscopy_on_networkmounted/
👍6❤🔥1
mlua v0.10 升级体验
昨天把 mlua 从 0.9.9 升到 0.10.0,以为就 10 分钟的事,结果改了一个小时也没改完,从满血直接给我干到吐血:
• 所有 struct、trait lifetime 都删了,行吧,为了更方便推断类型,我可以批量替换下
• trait 名从
• Scope 的
•
•
• 好消息,0.10.0 的
•
总之,非常糟糕升级体验,连迁移文档都没,全靠自己猜,改了 89 个文件了,卡在
https://github.com/sxyazi/yazi/pull/1842
昨天把 mlua 从 0.9.9 升到 0.10.0,以为就 10 分钟的事,结果改了一个小时也没改完,从满血直接给我干到吐血:
• 所有 struct、trait lifetime 都删了,行吧,为了更方便推断类型,我可以批量替换下
• trait 名从
TableExt 换成了 ObjectLike,也可以替换下• Scope 的
create_any_userdata 给扬了,啊?变更日志没有啊,也没标记 deprecated,就没了??直接把 owned any userdata 需求干死了,害,那就把我 struct 从 register_userdata_type() 全换成 UserData trait 吧•
mlua::String 的 to_str() 和 as_bytes() 返回类型也变了?从 Cow<str>、&[u8] 变成了 BorrowedStr、BorrowedBytes,用得时候得 let s = s.to_str(); let s = s.as_ref()。这个也没任何记录,对着编译器自己修吧•
mlua::String 的 to_string_lossy() 返回值从 Cow<str> 改成了 String,啊?标准库都不敢这么干,反正你 to lossy 我就分配内存。这个也没记录,对着编译器自己修吧• 好消息,0.10.0 的
UserDataRef 只能在 non-scoped 用了,scoped 就自求多福吧,https://github.com/mlua-rs/mlua/issues/475 - 这个昨天调了好久,它甚至不是一个编译错误,而是行为变化产生的运行时错误,同样没记录,不问不知道•
MultiValue::from_vec 也删了,没记录,也没标记 deprecated 就没了总之,非常糟糕升级体验,连迁移文档都没,全靠自己猜,改了 89 个文件了,卡在
UserDataRef 问题上,预感还远远没改完,还是头一次升级个 crate 改那么多东西。。。https://github.com/sxyazi/yazi/pull/1842
🤣7
最新 kitty 0.37.0 加了个超酷光标痕迹动画(cursor trail animation)
翻了下实现 PR 发现竟然还给 Yazi 做了适配, https://github.com/kovidgoyal/kitty/pull/7998 爱了!
翻了下实现 PR 发现竟然还给 Yazi 做了适配, https://github.com/kovidgoyal/kitty/pull/7998 爱了!
GitHub
Enhance Cursor Trail: Improved Animation, Fades, and New Distance Threshold Option by jinhwanlazy · Pull Request #7998 · kovidgoyal/kitty
continued from #7970. 3 main changes
Improved cursor trail animation. It now looks uniform regardless of its moving direction. The movement appears smoother, especially when the cursor moves horiz...
Improved cursor trail animation. It now looks uniform regardless of its moving direction. The movement appears smoother, especially when the cursor moves horiz...
🥰7
🌸
mlua v0.10 升级体验 昨天把 mlua 从 0.9.9 升到 0.10.0,以为就 10 分钟的事,结果改了一个小时也没改完,从满血直接给我干到吐血: • 所有 struct、trait lifetime 都删了,行吧,为了更方便推断类型,我可以批量替换下 • trait 名从 TableExt 换成了 ObjectLike,也可以替换下 • Scope 的 create_any_userdata 给扬了,啊?变更日志没有啊,也没标记 deprecated,就没了??直接把 owned any…
今天终于把它合了,拖了两周期间一直在跟 mlua 作者对线友好交流 - 巨大感谢 Alex 的所有帮助!
上个 post 提到的问题基本都解决了:
• 0.10 把
• 0.10 把
• 0.10 的
• 中途发现随机 panic bug:报告&修复了,https://github.com/mlua-rs/mlua/issues/477
• 中途发现
上个 post 提到的问题基本都解决了:
• 0.10 把
Scope::create_any_userdata 扬了:加回去了!• 0.10 把
MultiValue::from_vec() 扬了:加回去了!• 0.10 的
UserDataRef 只能在 non-scope 用,行为变了没记录:补充进了 breaking changes!• 中途发现随机 panic bug:报告&修复了,https://github.com/mlua-rs/mlua/issues/477
• 中途发现
AnyUserData::borrow() 行为也变了:加了 2 个新 API AnyUserData::destroy()、Scope::add_destructor() 还原之前行为,https://github.com/mlua-rs/mlua/issues/476👍4
想加个
上次
https://github.com/sxyazi/yazi/issues/1905
CODE_OF_CONDUCT.md,但不会写文案,发了个 good first issue,半小时收到了 claim,开心上次
CONTRIBUTING.md 也是这样找人写的,专业的事给专业的人,并且可以得到贡献机会 - 很多人想贡献只是不懂 Rust/编码,感觉这是个良性的社区互动https://github.com/sxyazi/yazi/issues/1905
GitHub
Add `CODE_OF_CONDUCT.md` · Issue #1905 · sxyazi/yazi
Some ideas: Respect different viewpoints Zero tolerance for harassment Communicate professionally and constructively Assume good intent in conversations – misunderstandings can happen, but give the...
❤4
昨天看 mlua 源码学到一个挺精妙的 trick:运行时检查类型
大概原理是给
mlua 利用这个 trick 为并发环境做了一些性能优化,如果
https://github.com/mlua-rs/mlua/commit/bb311349ecb24cb9ad4598f9c997eb9bf658f716
T 是否 Sync大概原理是给
T 创建一个 newtype,并为 newtype 实现 Copy、Clone 两个 trait,而 Copy 只在 T: Sync 时实现,然后调用 newtype 的 .clone(),看看走的 Copy 还是 Clone,如果是 Clone 表示 T 不 Sync。mlua 利用这个 trick 为并发环境做了一些性能优化,如果
T: Sync,就加 shared lock,否则 exclusive lockhttps://github.com/mlua-rs/mlua/commit/bb311349ecb24cb9ad4598f9c997eb9bf658f716
👍10
Yazi 有了新视频!
https://www.youtube.com/watch?v=TIxZ4G1JQ5c
13 分钟把基础操作、配置、插件/主题系统、包管理器、自定义 UI 都过了一遍,还介绍了些 tips,awesome!
https://www.youtube.com/watch?v=TIxZ4G1JQ5c
13 分钟把基础操作、配置、插件/主题系统、包管理器、自定义 UI 都过了一遍,还介绍了些 tips,awesome!
YouTube
Finally a terminal file explorer that doesn't suck!
Presentation of yazi, a terminal file explorer written in Rust with sane defaults and configuration.
I forgot to mention that you can create a file with `a` (it will create a directory if the name ends with /) and you can show hidden files by pressing `.`.…
I forgot to mention that you can create a file with `a` (it will create a directory if the name ends with /) and you can show hidden files by pressing `.`.…
👍2
Yazi 终端文件管理器 v0.4 发布!
经过 3 个月开发,很高兴宣布 Yazi 0.4 今天正式发布。
这是有史以来最大的一个版本,53 个新功能,41 项错误修复,以及 12 项性能改善。以下是新功能一览:
• Spotter
• 透明图像预览
• dark/light mode 支持
•
• Previewer/Preloader/Spotter/Fetcher 支持传递参数
• 查找关键字指示器
•
• tarballs 解压支持
• 智能批量重命名
• 更好的图像尺寸适配、用户配置解析
请阅读 https://github.com/sxyazi/yazi/releases/tag/v0.4.0 捕捉所有细节。
经过 3 个月开发,很高兴宣布 Yazi 0.4 今天正式发布。
这是有史以来最大的一个版本,53 个新功能,41 项错误修复,以及 12 项性能改善。以下是新功能一览:
• Spotter
• 透明图像预览
• dark/light mode 支持
•
ya emit / ya emit-to 子命令• Previewer/Preloader/Spotter/Fetcher 支持传递参数
• 查找关键字指示器
•
noop 虚拟命令• tarballs 解压支持
• 智能批量重命名
• 更好的图像尺寸适配、用户配置解析
请阅读 https://github.com/sxyazi/yazi/releases/tag/v0.4.0 捕捉所有细节。
🎉8🔥1