mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-02-04 06:56:47 +05:30
feat: update wallpaper command
This commit is contained in:
@@ -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);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user