Add option to override wallpaper to a specific image always

This commit is contained in:
Kevin Alberts 2019-12-24 16:11:19 +01:00
parent 95d2c26854
commit 2e81ad001f
Signed by: Kurocon
GPG key ID: BCD496FEBA0C6BC1
2 changed files with 5 additions and 1 deletions

View file

@ -34,6 +34,7 @@ class Config(BaseConfig):
# Images
desktop_bg = "/home/kevin/Pictures/wallpapers/desktop.png"
desktop_bg_folder = "/home/kevin/Pictures/wallpapers/desktop_rotation"
# desktop_bg_override = "/home/kevin/Pictures/safe_wallpaper.jpg"
applauncher_image = "/home/kevin/.config/qtile/kuro/resources/arch.png"
custom_layout_icon_paths = ['/home/kevin/.config/qtile/kuro/resources/layout_icons/']
glava_color_file_path = "/home/kevin/.config/glava/kurobars_color.glsl"

View file

@ -773,7 +773,10 @@ class Kuro(BaseTheme):
logger.warning("Could not load wallpapers from directory: {}".format(e))
if wallpapers:
qtile.theme_instance.current_wallpaper = os.path.join(wallpaper_dir, random.choice(wallpapers))
if Config.get("desktop_bg_override", False):
qtile.theme_instance.current_wallpaper = Config.get("desktop_bg_override", "")
else:
qtile.theme_instance.current_wallpaper = os.path.join(wallpaper_dir, random.choice(wallpapers))
Kuro.set_wallpaper(qtile, qtile.theme_instance.current_wallpaper)
else:
utils.execute_once("nitrogen --restore")