| Crates.io | wlrs |
| lib.rs | wlrs |
| version | 2.0.2 |
| created_at | 2024-02-07 18:58:59.591477+00 |
| updated_at | 2024-04-27 19:14:41.148041+00 |
| description | Rust library for managing wallpapers |
| homepage | |
| repository | https://github.com/unixpariah/wlrs |
| max_upload_size | |
| id | 1130836 |
| size | 45,748 |
Rust library for managing wallpapers
Setting from memory:
use wlrs::set_from_memory;
fn main() {
// Set to first monitor
let wallpaper = image::open("wallpaper.jpg").unwrap();
set_from_memory(wallpaper, vec![0]).unwrap();
// Set to multiple monitors
let wallpaper = image::open("wallpaper.jpg").unwrap();
set_from_memory(wallpaper, vec![0, 1]).unwrap();
// Set to all monitors
let wallpaper = image::open("wallpaper.jpg").unwrap();
set_from_memory(wallpaper, Vec::new()).unwrap();
}
Setting from file path:
use wlrs::set_from_path;
fn main() {
// Set to first monitor
set_from_path("wallpaper.jpg", vec![0]).unwrap();
// Set to multiple monitor
set_from_path("wallpaper.jpg", vec![0, 1]).unwrap();
// Set to all monitors
set_from_path("wallpaper.jpg", Vec::new())unwrap();
}