| external | ||
| images | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| CMakeLists.txt | ||
| README.md | ||
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.
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:
awwwis the default utility to apply wallpapers both on the workspaces and the backdrop.
It's required unless you want to only useswaybg, see below.
optional:
swaybgcan be used as an alternative for the workspaces only.magickcan be used to blur the wallpaper either on the workspaces and the backdrop.
Setup
Warning
The previous name of
awwwwasswww.
If you're still using an older version please adapt the commands to match your setup:
- Start the
awww-daemondaemon for the workspaces wallpaper. - Additionaly, start another
awww-daemondaemon instance with the "backdrop" namespace. - Config Niri to use the correct
awww-daemonfor 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:
