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:
@@ -49,6 +49,9 @@ Optional Dependencies:
|
||||
## Used for Tracking GPU Usage in your Dashboard (NVidia only)
|
||||
python
|
||||
python-gpustat
|
||||
|
||||
## Only if a pywal hook from wallpaper changes applied through settings is desired
|
||||
pywal
|
||||
```
|
||||
|
||||
Arch (pacman):
|
||||
|
||||
@@ -1068,7 +1068,8 @@ const options = mkOptions(OPTIONS, {
|
||||
|
||||
wallpaper: {
|
||||
enable: opt(true),
|
||||
image: opt("")
|
||||
image: opt(""),
|
||||
pywal: opt(false)
|
||||
},
|
||||
|
||||
notifications: {
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ export const MenuTheme = () => {
|
||||
}
|
||||
}),
|
||||
Option({ opt: options.theme.bar.menus.monochrome, title: 'Use Global Colors', type: 'boolean', disabledBinding: options.theme.matugen }),
|
||||
Option({ opt: options.wallpaper.pywal, title: 'Generate Pywal Colors', subtitle: 'Whether to also generate pywal colors with chosen wallpaper', type: 'boolean' }),
|
||||
Option({ opt: options.wallpaper.enable, title: 'Apply Wallpapers', subtitle: 'Whether to apply the wallpaper or to only use it for Matugen color generation.', type: 'boolean' }),
|
||||
Option({ opt: options.wallpaper.image, title: 'Wallpaper', subtitle: options.wallpaper.image.bind("value"), type: 'wallpaper' }),
|
||||
Option({ opt: options.theme.bar.menus.background, title: 'Background Color', type: 'color' }),
|
||||
|
||||
Reference in New Issue
Block a user