feat: update wallpaper command

This commit is contained in:
tux
2026-01-10 05:45:01 +05:30
parent b41e5706e1
commit 38b6cfb89a

View File

@@ -94,16 +94,7 @@ const setWallpaper = (name: string) => {
if (!hyprctl) return; if (!hyprctl) return;
const preloadedWalls = exec([hyprctl, "hyprpaper", "listloaded"]); exec([hyprctl, "hyprpaper", "wallpaper", `,${imagePath},`]);
const nWall = preloadedWalls.split("\n").length;
console.log(nWall);
if (nWall >= 5) {
exec([hyprctl, "hyprpaper", "unload", "all"]);
}
exec([hyprctl, "hyprpaper", "preload", imagePath]);
exec([hyprctl, "hyprpaper", "wallpaper", `,${imagePath}`]);
app.toggle_window(WINDOW_NAME); app.toggle_window(WINDOW_NAME);
}; };