3 stable releases
Uses new Rust 2024
new 1.2.0 | May 15, 2025 |
---|---|
1.1.0 | May 15, 2025 |
1.0.0 | May 15, 2025 |
#2 in #switcher
282 downloads per month
14KB
267 lines
🖼️ Hyprland Wallpaper Switcher
A Rust-based wallpaper switcher for Hyprland, with automatic orientation detection, rotation tracking, and blurred lock screen background generation.
✨ Features
- Detects each monitor's orientation (landscape or portrait) using
hyprctl
- Rotates wallpapers per-orientation, one per monitor
- Avoids repeating wallpapers until the list is exhausted
- Creates blurred + darkened overlays for use with
swaylock-effects
- Automatically stores rotation state per orientation in
~/.cache/
📂 Expected Directory Structure
Your wallpapers should be stored in:
~/Pictures/Wallpapers/
├── nature1.jpg
├── anime_vertical.webp
└── urban_landscape.png
Orientation is auto-detected via image dimensions (not by subfolder).
🔧 Requirements
Make sure the following are installed and in your $PATH
:
hyprctl
imagemagick
(magick
CLI for blur overlays)identify
(part ofimagemagick
) for resolution detectionwalkdir
(Rust dependency; bundled)
Optional for lock screen integration:
swaylock-effects
🚀 Usage
-
Build the binary:
cargo build --release
-
Run the app:
./target/release/wallpaper-switcher
It will:
- Load all wallpaper images under
~/Pictures/Wallpapers
- Assign images to monitors based on orientation
- Cycle through images and remember which one was used last
- Preload + apply wallpapers via
hyprctl hyprpaper
- Create a blurred/darkened image per monitor in
/tmp/hyprlock/<monitor>.png
- (Optional) Add a keybind to your Hyprland config:
bind = $mod, W, exec, ~/dev/wallpaper-switcher/target/release/wallpaper-switcher
🔐 Lock Screen Integration
To use the blurred wallpapers with swaylock-effects
, configure it like:
swaylock -i /tmp/hyprlock/DP-1.png
Each monitor will have a unique file based on its name.
💾 Caching & State
Rotation index is stored in:
~/.cache/hyprpaper_index_landscape
~/.cache/hyprpaper_index_portrait
These track your progress through each list and reset automatically when exhausted.
📜 License
MIT
Dependencies
~6–15MB
~197K SLoC