mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-23 10:02:45 +00:00
refactor: make the whole thing more generic
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import options from "../options.js";
|
||||
import { exec, execAsync } from "resource:///com/github/Aylur/ags/utils.js";
|
||||
import { dependencies } from "../utils.js";
|
||||
|
||||
export function initWallpaper() {
|
||||
if (dependencies(["swww"])) {
|
||||
exec("swww init");
|
||||
|
||||
options.desktop.wallpaper.img.connect("changed", wallpaper);
|
||||
}
|
||||
}
|
||||
|
||||
export function wallpaper() {
|
||||
if (!dependencies(["swww"])) return;
|
||||
|
||||
execAsync(["swww", "img", options.desktop.wallpaper.img.value]).catch((err) =>
|
||||
console.error(err),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user