Files
niri-beyond-glass/README.md
T
2026-07-27 17:11:49 +08:00

125 lines
4.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Niri Beyond Glass
面向 **Ubuntu 24.04 LTS** 的可移植 Niri + DankMaterialShell 桌面配置。
一条命令安装 Niri 26.04、Xwayland 支持、DMS 1.5.3 和 Quickshell 0.3.0
同时保留原有 GNOME 与 GDM,可在登录界面随时切换会话。
## 效果与范围
- Niri 滚动平铺、窗口圆角、阴影、流畅动画
- 支持 Niri 26.04 的背景模糊、`xray` 和轻微噪点效果
- DMS Morandi 顶栏:左侧启动器/工作区/窗口,中间时钟,右侧系统组件
- 统一的启动器、控制中心、通知、音量亮度 OSD 和 DMS 锁屏
- Inter Variable 1.2 倍界面字体、1.22 倍图标和 14pt JetBrains Mono 终端
- 0.84/0.88 半透明组件、背景模糊、12px 圆角和 Morandi Nocturne 配色
- 中文快捷键说明
- 浏览器、视频播放器、Steam 保持完全不透明
- 自动备份已有配置,可卸载恢复
本项目迁移桌面个性化,但**不包含或替换壁纸**:升级时读取目标机正在使用的
壁纸并继续使用。项目也不包含动态壁纸、DMS Greeter、GRUB 主题或 Wallpaper
Engine 创意工坊图片,不修改显示器分辨率、缩放和排列。
## 一键安装
```bash
curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/install.sh | bash
```
首次安装需要编译 Niri,并下载隔离的 DMS 运行环境与 NixGL 图形驱动桥接,
最终约占用 3.3 GB。脚本会调用 `sudo` 安装依赖,但必须以普通用户运行。完成后注销,在
GDM 会话菜单选择 **Niri**
已经运行过旧版安装器但顶栏风格不一致时,直接再次运行同一命令。脚本会跳过
已经安装的 Niri,原地替换 Waybar/Mako 风格:
```bash
curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/install.sh | bash
```
使用自己的静态壁纸:
```bash
curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/install.sh \
-o /tmp/install-niri.sh
bash /tmp/install-niri.sh --wallpaper "$HOME/Pictures/wallpaper.jpg"
```
只更新配置,不编译和安装软件:
```bash
bash /tmp/install-niri.sh --config-only
```
## 常用快捷键
| 快捷键 | 功能 |
|---|---|
| `Super + Enter` | 终端 |
| `Super + D` / `Super + Space` | DMS 应用启动器 |
| `Super + B` | 默认浏览器 |
| `Super + E` | 文件管理器 |
| `Super + O` | 总览 |
| `Super + Q` | 关闭窗口 |
| `Super + V` | 剪贴板 |
| `Super + Alt + L` | DMS 锁屏 |
| `Super + A` | 控制中心 |
| `Super + Shift + /` | 中文快捷键总览 |
| `Super + PageUp/PageDown` | 切换工作区 |
| `Super + Shift + E` | 退出 Niri |
`Super` 就是键盘上的 Windows 徽标键或 Mac 键盘上的 Command 键。
## 安全设计
- 仅支持 Ubuntu 24.04,检测到其他版本会停止
- 不替换显示管理器,不修改 GDM,不移除 GNOME
- 安装前备份 Niri、旧桌面组件、DMS 和 Alacritty 配置
- Niri 和 Xwayland Satellite 固定到明确版本
- DMS、Quickshell 及 Qt 依赖位于项目专用 Nix profile,不替换 Ubuntu 系统库
- Rust 工具链隔离在 `~/.local/share/niri-beyond-glass`
- 配置安装后使用 `niri validate` 校验
首次安装前的原配置和更新快照位于:
```text
~/.local/state/niri-beyond-glass/original/
~/.local/state/niri-beyond-glass/backups/
```
## 卸载
```bash
curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/uninstall.sh | bash
```
卸载器恢复最近一次配置备份,并保留已安装的系统软件和 Niri 二进制,避免破坏
其他会话。若要删除系统依赖,请按实际用途手动处理,不建议执行盲目的
`apt autoremove`
## 已知限制
- Niri 26.04 比 Ubuntu 24.04 更新,因此脚本采用源码编译,而不是跨版本安装
PPA 二进制包。
- Ubuntu 24.04 自带的 `libdisplay-info` 版本不足时,脚本会在
`/usr/local` 编译安装 0.3.0。
- Ubuntu 24.04 的 PPA 没有 DMS/Quickshell 软件包,因此使用 Ubuntu 自带 Nix
作为隔离兼容层;这不把 Ubuntu 转换为 NixOS。
- Quickshell 通过 64 位 NixGL 桥接 Ubuntu 的 OpenGL/Vulkan 驱动;不安装
DMS 不需要的 32 位图形库。
- 不安装 DMS Greeter,登录界面仍由 GDM 管理;DMS 锁屏属于 Niri 会话内部。
- 壁纸和显示器布局不会从作者机器迁移。
- NVIDIA 用户应先确保 Ubuntu 官方驱动在 GNOME Wayland 下工作正常。
## 上游项目
- [Niri](https://github.com/niri-wm/niri)
- [DankMaterialShell](https://github.com/AvengeMedia/DankMaterialShell)
- [Quickshell](https://quickshell.org/)
- [NixGL](https://github.com/nix-community/nixGL)
- [Xwayland Satellite](https://github.com/Supreeeme/xwayland-satellite)
## License
[MIT](LICENSE)。Niri、Xwayland Satellite 及各依赖遵循其各自许可证。