niri 26.04 发布:久等的背景模糊终于来了

niri 26.04 正式版发布,带来了长期期待的 background blur 支持。通过 background-effect 配置块可在 window-rule 和 layer-rule 中启用在窗口和面板模糊,同时支持 ext-background-effect 与 org-kde-kwin-blur Wayland 协议。

niri 26.04 是 scrollable-tiling Wayland compositor 的一次重要更新。最引人注目的新特性是长期呼声最高的 background blur

新特性

  • background-effect 配置块:替代社区 fork 时代的旧语法,正式纳入 window-rule 和 layer-rule
  • popup 模糊支持:可在 popups {} 子块中独立配置弹出菜单的模糊效果
  • 协议支持:兼容 ext-background-effectorg-kde-kwin-blur,原生支持的应用(如 foot、kitty、Ghostty)零配置自动获得模糊
  • xray 模式:默认开启的高效模糊模式,仅采集背景表面,对性能几乎无影响

blur 配置速览

background-effect 块包含四个参数:

参数 类型 说明
xray bool 高效 xray 模糊模式(默认 true)
blur bool 开启/关闭模糊
noise float 噪点量,缓解模糊产生的色带
saturation float 饱和度(0=去色, 1=正常, >1=增强)

全局窗口模糊:

window-rule {
    clip-to-geometry true

    background-effect {
        xray true
        blur true
        noise 0.05
        saturation 3
    }
}

waybar 面板模糊(layer rule):

layer-rule {
    match namespace="^waybar$"

    background-effect {
        xray true
        blur true
        noise 0.05
        saturation 3
    }
}

popup 菜单模糊:

window-rule {
    match app-id="Nautilus"

    popups {
        geometry-corner-radius 15
        opacity 0.5

        background-effect {
            blur true
        }
    }
}

注意正式版语法与社区 fork(feat/blur 分支)不兼容,旧版 blur { on; passes 4; radius 1.0; noise 0.1; } 已废弃。

更多配置细节见 niri 官方 Wiki

Interaction

读完之后

分享海报
Interaction

评论区