| Crates.io | background-picker |
| lib.rs | background-picker |
| version | 0.1.0 |
| created_at | 2025-06-17 16:53:52.235159+00 |
| updated_at | 2025-06-17 16:53:52.235159+00 |
| description | Allow user to select a background from a directory hiearchy |
| homepage | https://github.com/rickprice/BackgroundPicker |
| repository | https://github.com/rickprice/BackgroundPicker |
| max_upload_size | |
| id | 1716042 |
| size | 203,024 |
A fast, efficient Rust GUI application for scanning directories and selecting desktop backgrounds from image thumbnails. Features intelligent caching and seamless integration with file manager thumbnails.
--pregenerate): Batch cache generation and exit--debug): Detailed operation loggingfeh --bg-max)# Clone and build
git clone <repository-url>
cd BackgroundPicker
cargo build --release
# Or run directly
cargo run -- --help
# Browse current directory
cargo run
# Browse specific directory with custom settings
cargo run -- -d ~/Pictures -t 200 -c "nitrogen --set-scaled"
# Built binary
./target/release/background-picker -d ~/Pictures
# Pre-generate thumbnails for faster browsing later
cargo run -- --pregenerate -d ~/Pictures
# With detailed progress output
cargo run -- --pregenerate --debug -d ~/Pictures
# Step 1: Generate all thumbnails (runs in background)
background-picker --pregenerate -d ~/Pictures
# Step 2: Browse with instant thumbnails
background-picker -d ~/Pictures
| Option | Short | Default | Description |
|---|---|---|---|
--directory |
-d |
. |
Directory to scan for images |
--thumbnail-size |
-t |
150 |
Thumbnail size in pixels |
--command |
-c |
"feh --bg-max" |
Command to set background |
--state-file |
-s |
background-picker-state.yaml |
State file path |
--debug |
Enable detailed debug output | ||
--pregenerate |
Generate thumbnails and exit (no GUI) | ||
--help |
-h |
Show help information |
The application supports any command-line wallpaper tool:
# feh (default - maintains aspect ratio)
-c "feh --bg-max"
# feh (fills screen, may crop)
-c "feh --bg-scale"
# nitrogen
-c "nitrogen --set-scaled"
# Custom script
-c "/path/to/set-wallpaper.sh"
~/.cache/thumbnails/ directory# Browse images in file manager first (creates thumbnails)
pcmanfm ~/Pictures
# Then use background picker (instant thumbnails!)
background-picker -d ~/Pictures
Built with modern Rust ecosystem:
feh, nitrogen, or custom command# Quick browse and select
background-picker
# Browse specific folder
background-picker -d ~/Wallpapers
# Pre-generate cache for 1000+ images
background-picker --pregenerate -d ~/Pictures
# Later: instant browsing
background-picker -d ~/Pictures
# Use with different wallpaper tools
background-picker -c "nitrogen --set-zoom-fill" -d ~/Backgrounds
# Custom thumbnail size for high-DPI displays
background-picker -t 300 -d ~/Pictures
# Debug thumbnail cache behavior
background-picker --debug -d ~/Pictures
#!/bin/bash
# Batch generate thumbnails for multiple directories
for dir in ~/Pictures/*/; do
echo "Processing $dir..."
background-picker --pregenerate -d "$dir"
done
The application automatically quits after setting a background, making it perfect for quick wallpaper changes and integration with desktop shortcuts or scripts.