forked from Shinonome/caelestia-cli
wallpaper: fix smart mode
Do not switch mode if not dynamic scheme
This commit is contained in:
@@ -91,7 +91,7 @@ def get_colours_for_wall(wall: Path | str, no_smart: bool) -> None:
|
|||||||
scheme = get_scheme()
|
scheme = get_scheme()
|
||||||
cache = wallpapers_cache_dir / compute_hash(wall)
|
cache = wallpapers_cache_dir / compute_hash(wall)
|
||||||
|
|
||||||
if not no_smart:
|
if scheme.name == "dynamic" and not no_smart:
|
||||||
scheme = Scheme(
|
scheme = Scheme(
|
||||||
{
|
{
|
||||||
"name": scheme.name,
|
"name": scheme.name,
|
||||||
@@ -105,7 +105,7 @@ def get_colours_for_wall(wall: Path | str, no_smart: bool) -> None:
|
|||||||
return {
|
return {
|
||||||
"name": scheme.name,
|
"name": scheme.name,
|
||||||
"flavour": scheme.flavour,
|
"flavour": scheme.flavour,
|
||||||
"mode": get_smart_mode(wall, cache),
|
"mode": scheme.mode,
|
||||||
"variant": scheme.variant,
|
"variant": scheme.variant,
|
||||||
"colours": get_colours_for_image(get_thumb(wall, cache), scheme),
|
"colours": get_colours_for_image(get_thumb(wall, cache), scheme),
|
||||||
}
|
}
|
||||||
@@ -133,7 +133,7 @@ def set_wallpaper(wall: Path | str, no_smart: bool) -> None:
|
|||||||
scheme = get_scheme()
|
scheme = get_scheme()
|
||||||
|
|
||||||
# Change mode based on wallpaper colour
|
# Change mode based on wallpaper colour
|
||||||
if not no_smart:
|
if scheme.name == "dynamic" and not no_smart:
|
||||||
scheme.mode = get_smart_mode(wall, cache)
|
scheme.mode = get_smart_mode(wall, cache)
|
||||||
|
|
||||||
# Update colours
|
# Update colours
|
||||||
|
|||||||
Reference in New Issue
Block a user