This commit is contained in:
parent
997508cedf
commit
636197baab
@ -2,8 +2,15 @@ use std::fmt::Write as _;
|
||||
use crate::lib::ipc;
|
||||
use crate::Wallpapers;
|
||||
|
||||
use std::env;
|
||||
|
||||
pub fn change_wallpapers(wallpapers: &Wallpapers) {
|
||||
let ipc = ipc::IPC::new(String::from("/run/user/1000/hypr/9958d297641b5c84dcff93f9039d80a5ad37ab00_1751412591_2000702590/.hyprpaper.sock"));
|
||||
let hypr_session = env::var("HYPRLAND_INSTANCE_SIGNATURE").unwrap();
|
||||
let xdg_path = env::var("XDG_RUNTIME_DIR").unwrap();
|
||||
|
||||
let mut socket_path = String::new();
|
||||
write!(&mut socket_path, "{}/hypr/{}/.hyprpaper.sock", xdg_path, hypr_session).unwrap();
|
||||
let ipc = ipc::IPC::new(socket_path);
|
||||
|
||||
for monitor in wallpapers.config.monitors.monitors.iter() {
|
||||
let mut buf = String::new();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user