๐จ Wallpaper Integration โจ๐ผ๏ธ
My dotfiles include seamless support for both ๐ Nord and ๐ฒ Everforest wallpapers, dynamically managed through Nix flakes and tightly coupled with the current color scheme. Beautiful wallpapers, automatically in sync with your system theme. ๐๐
๐ฆ Flake Inputs ๐ง๐ฟ
Both wallpaper collections are added as inputs in flake.nix
:
{
inputs = {
nord-wallpapers = {
url = "github:Gurjaka/Nord-Wallpapers";
inputs.nixpkgs.follows = "nixpkgs";
};
everforest-wallpapers = {
url = "github:Gurjaka/Everforest-Wallpapers";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
๐ก Home Manager Integration ๐๐
In home-manager/modules/theme/wallpapers.nix
, the contents of each repo are symlinked into ~/.config/wallpapers/
:
{ inputs, pkgs, ... }:
{
home.file = {
".config/wallpapers/nord/" = {
source = inputs.nord-wallpapers.packages."${pkgs.system}".default;
recursive = true;
};
".config/wallpapers/everforest/" = {
source = inputs.everforest-wallpapers.packages."${pkgs.system}".default;
recursive = true;
};
};
}
๐ This setup ensures all wallpapers are in one tidy location based on theme. ๐งผโจ
๐ Dynamic Wallpaper Switching (wallrandom
) ๐ฒ๐ผ๏ธ
A custom script called wallrandom
randomly picks a wallpaper based on the current theme, then applies it using swww
with a beautiful animated transition. ๐
Defined in wallrandom.nix
:
{ pkgs }:
pkgs.writeShellScriptBin "wallrandom" ''
set -e
FLAKE=$HOME/Dotfiles/flake.nix
FLAKE_DIR=$HOME/Dotfiles
# Detect current theme from flake.nix
current=$(grep 'colorscheme = "' "$FLAKE" | sed -E 's/.*"([^"]+)".*/\1/')
DIR=$HOME/.config/wallpapers/$current
PICS=($(ls ''${DIR}))
RANDOMPICS=''${PICS[ $RANDOM % ''${#PICS[@]} ]}
swww query || swww-daemon
swww img ''${DIR}/''${RANDOMPICS} \
--transition-fps 165 \
--transition-type grow \
--transition-pos 0.2,0.2 \
--transition-duration 1
''
๐ This script:
- ๐ Detects your current
colorscheme
from the flake - ๐ฒ Picks a random wallpaper from the theme-matched folder
- ๐ Applies it with a smooth
swww
transition
๐งช Usage ๐ปโก
Once wallrandom
is in your $PATH
, just run:
๐ก Pro Tip: Bind this to a keyboard shortcut in your WM for instant wallpaper shuffle magic. ๐ง
๐ Related Repositories
- ๐ Nord Wallpapers โ minimal & icy
- ๐ฒ Everforest Wallpapers โ warm & cozy
These collections are handcrafted and curated with aesthetics and compatibility in mind. ๐จ๐งโโ๏ธ