Add option to override wallpaper to a specific image always
This commit is contained in:
		
							parent
							
								
									95d2c26854
								
							
						
					
					
						commit
						2e81ad001f
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue