文章摘要
niri是一个支持滚动平铺的Wayland合成器,采用Rust编写,提供现代化的窗口管理功能。该项目托管在GitHub上,包含相关代码和文档。
文章总结
niri:一款可滚动平铺的Wayland合成器
项目简介
niri是一款基于Wayland的可滚动平铺式窗口合成器,其核心设计理念是将窗口以无限向右延伸的列式布局排列,新窗口的打开不会导致现有窗口调整大小。每个显示器拥有独立的窗口条带,窗口不会"溢出"到相邻显示器上。
主要特性
- 动态工作区:类似GNOME的垂直排列工作区,每个显示器有独立的工作区集
- 全局概览:可缩放显示所有工作区和窗口
- 内置截图工具:支持通过xdg-desktop-portal-gnome进行屏幕录制
- 手势支持:触控板和鼠标手势操作
- 窗口标签页:可将窗口分组为标签页
- 高度可定制:支持间隙、边框、窗口大小等布局调整
- 动画效果:支持自定义着色器的动画系统
- 实时重载配置:修改配置无需重启
- 无障碍支持:兼容屏幕阅读器
使用状态
niri已稳定可用于日常使用,支持: - 多显示器混合DPI - 分数缩放 - NVIDIA显卡 - 浮动窗口(自v25.01起) - 多种输入设备(数位板、触控板、触摸屏) - Xwayland集成(自v25.08起)
相关资源
- 入门指南
- 配置文档
- awesome-niri(相关资源集合)
媒体推荐
- 视频演示:Niri Is My New Favorite Wayland Compositor
- 开发演讲:niri: Making a Wayland compositor in Rust(含英文字幕)
- LWN专题文章:A tour of the niri scrolling-tiling Wayland compositor
灵感来源
主要受PaperWM启发,但解决了其作为GNOME扩展在显示器隔离方面的限制。
联系方式
- Matrix聊天室:#niri:matrix.org
- Discord社区:邀请链接
(注:原文中的图片链接和技术细节已作简化处理,保留了核心功能描述和使用信息)
评论总结
Niri 用户评论总结
1. 支持 Niri 的观点
流畅的工作空间管理:用户认为 Niri 的自然窗口和工作空间管理方式更符合他们的使用习惯,尤其是无需重新调整窗口布局的特性。
- "Niri feels like it lines up more naturally with the way I tend to use windows and workspaces."
- "My other windows in the workspace aren’t altered by these new ones, no reflow happens."
低门槛与开箱即用:部分用户从其他窗口管理器(如 xmonad)转向 Niri,认为其配置简单且功能实用。
- "Really low barrier to entry, works great out of the box."
- "Niri convinced me to give up xmonad. I ran xmonad exclusively for 14 years."
2. 偏好其他窗口管理器的观点
Hyprland 的吸引力:部分用户更青睐 Hyprland 的分页式设计或美观性。
- "There’s something about 'pagination' vs a scrollable compositor that makes things feel much more targeted and organized."
- "Hyprland is still the most usable/pretty ratio for me."
动画效果的争议:有用户批评 Niri 和 Hyprland 默认的动画效果分散注意力。
- "They are just way too distracting, I don’t understand why people like them."
3. 功能与兼容性质疑
- Wayland 的稳定性问题:部分用户对 Wayland 的兼容性(尤其是 NVIDIA 显卡)持保留态度。
- "Does Wayland actually work now? I’ve tried it every few years... and every time I ran into showstopper bugs."
- 与 Sway 的比较:用户询问 Niri 与 Sway 的差异,但未展开讨论。
- "How does it compare to Sway?"
4. 使用场景限制
- macOS 用户的无奈:有用户因工作限制无法切换系统,但对 Niri 的工作流表示向往。
- "I want this on macos. I know I can’t have it on macos... I feel like I’m not alone feeling stuck."
- 配置灵活性改进:用户提到 Niri 近期新增的配置文件覆盖功能解决了多设备配置的痛点。
- "Its configuration was limited to 1 file... Just the other day the author merged PRs to handle both use cases."
5. 其他反馈
- 新功能尝试:用户对新增的浮动窗口功能表示兴趣。
- "Wow, they have added floating windows. Need to try again!"
- 安装与兼容性提问:部分用户询问 Ubuntu 支持或分享安装体验。
- "Is there a way to run this in Ubuntu?"
总结
Niri 因其自然的工作空间管理和低配置门槛获得好评,尤其吸引从 i3 或 xmonad 迁移的用户。但部分用户仍偏好 Hyprland 的设计或对 Wayland 兼容性存疑。近期配置灵活性的改进和新增功能(如浮动窗口)可能进一步扩大其吸引力。