zaroutt
Niri-glass
Rust✨ New

Niri with glass / refraction effect

Last updated Aug 5, 2026
91
Stars
5
Forks
2
Issues
+1
Stars/day
Attention Score
40
Language breakdown
Rust 78.6%
GLSL 14.1%
Nix 5.0%
Shell 2.2%
β–Έ Files click to expand
README

Liquid Glass Effect for Niri

English | δΈ­ζ–‡

Examples

1.

Screenshot from 2026-07-02 00-06-33

1.

Screenshot from 2026-06-30 12-31-50

1.

Screenshot from 2026-06-30 12-32-48

1.

Screenshot from 2026-06-30 12-34-48

1.

Screenshot from 2026-06-30 12-40-02

Files

Shader

  • src/renderhelpers/shaders/clippedsurface.frag - Main liquid glass effect shader (based on kwin-effects-glass)

Rust (rendering)

  • src/renderhelpers/liquidglass.rs - LiquidGlassOptions struct with effect parameters
  • src/renderhelpers/backgroundeffect.rs - Liquid glass integration with background effect
  • src/renderhelpers/framebuffereffect.rs - Uniform passing to shader (windows)
  • src/render_helpers/xray.rs - Uniform passing to shader (xray)
  • src/render_helpers/shaders/mod.rs - Uniform registration during shader compilation
  • src/renderhelpers/mod.rs - Module declaration for liquidglass

Niri Config

  • config.kdl - Example configuration with liquid-glass enabled

How to Apply

Nix / NixOS (flake)

This repo ships a flake that builds niri with the liquid-glass overlay applied on top of the matching upstream niri release (pinned to rev 49fc611, niri 26.04). No manual file copying or install.sh needed.

Quick try-out (no install):

nix run github:zaroutt/Niri-glass          # run the compositor
nix shell github:zaroutt/Niri-glass        # drop niri-glass into a shell
nix develop github:zaroutt/Niri-glass      # dev shell (rust + niri build deps)
nix build  github:zaroutt/Niri-glass       # build, result at ./result

NixOS (flake), reusing the upstream niri session/portal/polkit wiring:

{
  inputs.niri-glass.url = "github:zaroutt/Niri-glass";

# in your nixosConfiguration modules: imports = [ inputs.niri-glass.nixosModules.default ]; programs.niri-glass.enable = true; }

home-manager:

{
  imports = [ inputs.niri-glass.homeManagerModules.default ];
  programs.niri-glass = {
    enable = true;
    # optional: manage ~/.config/niri/config.kdl
    config = builtins.readFile ./niri/config.kdl;
  };
}

Or just add the package via the overlay (overlays.default exposes pkgs.niri-glass) or reference inputs.niri-glass.packages.<system>.niri-glass directly anywhere a package is expected (e.g. programs.niri.package).

The flake is pinned to the exact niri revision these overlay files were
written against. If you bump the niri input, refresh the overlay files to
match or the build may fail to compile.

install.sh (non-Nix)

Clone the official repo and this one and run the install script:

git clone https://github.com/niri-wm/niri
git clone https://github.com/zaroutt/Niri-glass
cd Niri-glass
./install.sh
This will create a new wayland session. You will be able to choose in your login manager.

Manual steps

  • Copy files to your niri src/ directory
  • Run cargo build --release in the niri source
  • Copy target/release/niri to /usr/bin/local/niri-glass (requires sudo)

Configuration

Example with all parameters

In config.kdl:

window-rule {
    match app-id =".*"
    background-effect {
        blur true
        xray true
        liquid-glass {
            refraction-strength 3.0
            power-factor 10
            refraction-power 1.0
            glow-weight 0.0001
            edge-lighting 0.2
            saturation 0.9
            vibrancy 0.2
            adaptive-dim 0.2
            adaptive-boost 0.2
            physical-refraction 0
            lens-distortion 0
            fringing 0

} } }

Parameters for a frosted glass look

saturation 0.9
vibrancy 0.2
adaptive-dim 0.25
adaptive-boost 0.25

Screenshot from 2026-06-30 13-40-40

With all parameters set to 0 (except saturation, which is set to 1):

Screenshot from 2026-06-30 13-37-39 ```

others

  • fringing:
this make rgb colors appear

Screenshot from 2026-06-30 16-13-20

  • edge-lightning
this make the wallpapers colors blend with the edges

Screenshot from 2026-06-30 16-18-04

Screenshot from 2026-06-30 16-17-54

More examples

Interaction with live wallpaper with shadows enabled

https://github.com/user-attachments/assets/4fceeaaf-4ff1-4c4d-adcf-af52cd33a912

With xray set to false

Screenshot from 2026-07-22 20-58-17

Warnings

  • Tested in the 26.04 version
  • newer versions may conflict with this.
  • Vibe coded project so expect weirdly behavior.
πŸ”— More in this category

Β© 2026 GitRepoTrend Β· zaroutt/Niri-glass Β· Updated daily from GitHub