Compare commits
	
		
			2 commits
		
	
	
		
			5a913e25d8
			...
			d3d2f8a829
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
							 | 
						d3d2f8a829 | ||
| 
							 | 
						10dabc805c | 
					 2 changed files with 5 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,3 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
from sys import exit
 | 
			
		||||
from os import chdir, getenv, system
 | 
			
		||||
import logging
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +41,6 @@ class _ConfigLib:
 | 
			
		|||
            logger.warning("'systray' is not set in the dictionary general in the config file, defaulting to 'true'.")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        # Setup logging
 | 
			
		||||
        self._set_log_level()
 | 
			
		||||
        if self.config_systray:
 | 
			
		||||
| 
						 | 
				
			
			@ -57,7 +55,7 @@ class _ConfigLib:
 | 
			
		|||
    def _set_log_level(self):
 | 
			
		||||
        global logging
 | 
			
		||||
        global logger
 | 
			
		||||
        chdir(str(getenv("HOME")) + "/.local/share/wallman/")
 | 
			
		||||
        chdir("/var/log/wallman/")
 | 
			
		||||
        numeric_level = getattr(logging, self.config_log_level, logging.INFO)
 | 
			
		||||
        logger.setLevel(numeric_level)
 | 
			
		||||
        logging.basicConfig(filename="wallman.log", encoding="utf-8", level=numeric_level)
 | 
			
		||||
| 
						 | 
				
			
			@ -90,8 +88,8 @@ class ConfigValidity(_ConfigLib):
 | 
			
		|||
        else:
 | 
			
		||||
            try:
 | 
			
		||||
                self._set_fallback_wallpaper()
 | 
			
		||||
                logger.error("The amount of changing_times and the amount of wallpapers_per_set does not much, the fallback wallpaper has been set.")
 | 
			
		||||
                print("ERROR: The amount of changing_times and the amount of wallpapers_per_set does not much, the fallback wallpaper has been set.")
 | 
			
		||||
                logger.error("The amount of changing_times and the amount of wallpapers_per_set does not match, the fallback wallpaper has been set.")
 | 
			
		||||
                print("ERROR: The amount of changing_times and the amount of wallpapers_per_set does not match, the fallback wallpaper has been set.")
 | 
			
		||||
                return False
 | 
			
		||||
            except ConfigError:
 | 
			
		||||
                logger.critical("The amount of changing times and the amount of wallpapers per set does not match, exiting...")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,7 +34,7 @@ def on_quit(icon, item, callback):
 | 
			
		|||
    icon.stop()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
chdir(str(getenv("HOME")) + "/.config/wallman/")
 | 
			
		||||
chdir("/etc/wallman/icons/systrayIcon")
 | 
			
		||||
try:
 | 
			
		||||
    icon_image = Image.open("systrayIcon.jpg")
 | 
			
		||||
except FileNotFoundError:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue