Add option for generation of pywal colors with wallpaper change (#219)

* Add option for generation of pywal colors with wallpaper change

* Update README.md

* Address review
This commit is contained in:
Ethan Vogelsang
2024-09-08 16:13:14 -05:00
committed by GitHub
parent 1aed9f51f9
commit 41dbc3829a
4 changed files with 11 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import icons from "lib/icons";
import { Notify, isAnImage } from "lib/utils";
import { bash, dependencies, Notify, isAnImage } from "lib/utils";
import options from "options";
import Wallpaper from "services/Wallpaper";
@@ -50,6 +50,10 @@ export const initializeTrackers = (resetCssFunc: Function) => {
options.resetTheme();
resetCssFunc();
}
if (options.wallpaper.pywal.value && dependencies('wal')) {
const wallpaperPath = options.wallpaper.image.value;
bash(`wal -i ${wallpaperPath}`);
}
})
}