Set wallpaper on workspaces and backdrop for Niri.
Find a file
2026-06-18 11:45:46 +02:00
external Make Awww the default and allow namespaces; swaybg is now optional 2026-06-08 12:52:17 +02:00
images Add image example 2025-12-17 13:38:57 +01:00
src Allow to blur workspaces and backdrop independently 2026-06-08 16:21:19 +02:00
.gitignore Unify logic for applying wallpaper 2026-04-30 10:17:48 +02:00
.gitmodules first commit 2025-07-08 10:22:06 +02:00
CMakeLists.txt Unify logic for applying wallpaper 2026-04-30 10:17:48 +02:00
README.md Add links for Nix config examples 2026-06-18 11:45:46 +02:00

Niri Wallpaper

This is a wrapper utility around awww and/or swaybg to display your wallpapers on Niri for the workspaces and the backdrop with some nice to have features on top.

niri wallpaper

Features

  • Apply wallpapers on workspaces and the backdrop
  • Add animation effect to workspaces and/or backdrop wallpapers
  • Add blur effect to workspaces and/or backdrop wallpapers
  • Specify an interval to rotate you wallpapers
  • Wallpapers can be chosen randomly in a directory
  • Wallpapers can be chosen in alphabetical order in a directory
  • Pass additional command line argument to the underlying process displaying the wallpaper
  • If using swaybg, no "grey" flash when switching wallpapers

Dependencies

(almost) required:

  • awww is the default utility to apply wallpapers both on the workspaces and the backdrop.
    It's required unless you want to only use swaybg, see below.

optional:

  • swaybg can be used as an alternative for the workspaces only.
  • magick can be used to blur the wallpaper either on the workspaces and the backdrop.

Setup

Warning

The previous name of awww was swww.
If you're still using an older version please adapt the commands to match your setup:

  1. Start the awww-daemon daemon for the workspaces wallpaper.
  2. Additionaly, start another awww-daemon daemon instance with the "backdrop" namespace.
  3. Config Niri to use the correct awww-daemon for the backdrop.

Here is a quick code snippet to put in your niri config file that will set it up correctly

// Spawn the awww daemon for the workspaces wallpaper
spawn-at-startup "awww-daemon"

// Spawn the second awww daemon for the backdrop wallpaper with the namespace
spawn-at-startup "awww-daemon" "--namespace" "backdrop"

// Tell Niri to use the "backdrop" namespace for the backdrop.
layer-rule {
    match namespace="^awww-daemonbackdrop$"
    place-within-backdrop true
}

Usage

Example in a terminal:

./niri-wallpaper /path/to/wallpapers \
	-i 3600 \
	--workspaces-process-args "--transition-type grow" \
	--blur-backdrop

Example in the niri config file:

spawn-at-startup "/path/to/niri-wallpaper" "/path/to/wallpapers" "-i" "3600" "--workspaces-process-args" "--transition-type grow" "--blur-backdrop"

List of arguments:

usage: niri-wallpaper [options] <path>

required:
  path                           The path to the directory containing the wallpapers

options:
--blur-backdrop                        Blur the backdrop wallpaper
--blur-workspaces                      Blur the workspaces wallpaper
--workspaces-process-args <string>     Arguments that will be passed to the process of the workspaces wallpaper
--backdrop-process-args <string>       Arguments that will be passed to the process of the backdrop wallpaper
--interval, -i <number>                Specify the interval between wallpapers in seconds
--never-random                         if set, wallpapers order is based on the names of the files
--no-backdrop-wallpaper                Do not change change the backdrop wallpaper, in case you only want the workspaces wallpaper
--no-workspaces-wallpaper              Do not change change the workspaces wallpaper, in case you only want the backdrop wallpaper
--path-awww <string>                   Set the path for executing awww
--path-magick <string>                 Set the path for executing magick
--path-swaybg <string>                 Set the path for executing swaybg
--path-swaylock <string>               Set the path for executing swaylock
--use-swaybg                           Use swaybg instead of awww for the workspaces wallpaper instead of awww
--lock                                 Lock the screen using swaylock instead of applying a wallpaper
--help, -h                             Show help

Animations & Effects

Because this utility use awww under the hood, you can pass any argument to it using the --workspaces-process-args and --backdrop-process-args arguments.
See the awww page, or better : man awww-img

You can blur the wallpapers with --blur-workspaces and --blur-backdrop, this use magick under the hood.

if you use the --use-swaybg argument, the --workspaces-process-args will work too.

Using swaybg

swaybg is lighter on memory than awww, if you don't need any of the animations/effets and don't care about the backdrop wallpaper but you still want the wallpapers rotation, you can use the --use-swaybg and --no-backdrop-wallpaper arguments.

Installation

Build from source

First, clone this repository git clone --recursive https://codeberg.org/vyn/niri-wallpaper.git (or download it the way you prefer).

You only need gcc and cmake, run these commands in the project directory:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

The executable should be located in build/niri-wallpaper

Using Nix

I don't use Nix myself and don't want to add things I can't test, but some kind people have already done the work, feel free to use them at your own risk: