niri: enable blur

This commit is contained in:
2026-02-24 16:50:17 +08:00
parent 850f014a08
commit 0cefd0799d
2 changed files with 354 additions and 331 deletions
+41
View File
@@ -0,0 +1,41 @@
include "generated-config.kdl"
layout {
border {
on
}
}
blur {
passes 3
offset 4
noise 0.02
saturation 1.5
}
window-rule {
draw-border-with-background false
geometry-corner-radius 14.000000 14.000000 14.000000 14.000000
clip-to-geometry true
background-effect {
xray true
blur true
}
}
window-rule {
match is-floating=true
background-effect {
xray false
}
}
window-rule {
match app-id="kitty|foot|Alacritty|ghostty"
opacity 0.8
}
window-rule {
match app-id="org.gnome.Nautilus"
opacity 0.6
}
+8 -26
View File
@@ -3,6 +3,7 @@
lib, lib,
pkgs, pkgs,
assets, assets,
impure,
... ...
}: }:
let let
@@ -10,7 +11,11 @@ let
in in
{ {
config = lib.mkIf config.my.desktop.wm.niri.enable { config = lib.mkIf config.my.desktop.wm.niri.enable {
my.hm.programs.niri.settings = { my.hm = {
xdg.configFile.niri-config.target = lib.mkForce "niri/generated-config.kdl";
xdg.configFile."niri/config.kdl".source = impure.mkImpureLink ./config.kdl;
programs.niri.settings = {
input = { input = {
focus-follows-mouse = { focus-follows-mouse = {
enable = true; enable = true;
@@ -76,34 +81,9 @@ in
matches = [ { namespace = "^wallpaper$"; } ]; matches = [ { namespace = "^wallpaper$"; } ];
place-within-backdrop = true; place-within-backdrop = true;
} }
{
matches = [ { namespace = "^waybar$"; } ];
opacity = 0.99;
}
]; ];
overview.workspace-shadow.enable = false; overview.workspace-shadow.enable = false;
window-rules = [
{
geometry-corner-radius = {
bottom-left = 14.;
bottom-right = 14.;
top-left = 14.;
top-right = 14.;
};
clip-to-geometry = true;
draw-border-with-background = false;
}
{
matches = [ { app-id = "kitty|foot|Alacritty|ghostty|wofi"; } ];
opacity = 0.8;
}
{
matches = [ { app-id = "org.gnome.Nautilus"; } ];
opacity = 0.6;
}
];
environment.NIXOS_OZONE_WL = "1"; environment.NIXOS_OZONE_WL = "1";
spawn-at-startup = lib.mkBefore ( spawn-at-startup = lib.mkBefore (
@@ -358,5 +338,7 @@ in
}) (lib.range 0 9) }) (lib.range 0 9)
); );
}; };
};
}; };
} }