Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_opt_list(self):
current_backend = settings.get("backend", "wal")
i = self.backend_list.index(current_backend)
self.backend_combo.set_active(i)
self.color_combo\
.set_active(settings.getint("active", 0))
self.gtk_switch\
.set_active(settings.getboolean("gtk", True))
self.command_switch\
.set_active(settings.getboolean("execute_cmd", False))
self.light_theme_switch\
.set_active(settings.getboolean("light_theme", False))
self.wallpaper_switch\
.set_active(settings.getboolean("set_wallpaper", True))
self.smart_sort_switch\
.set_active(settings.getboolean("smart_sort", True))
self.auto_adjust_switch\
def get_pywal_dict(wallpaper, is_file=False):
"""get the color dictionary of a given wallpaper"""
light_theme = settings.getboolean("light_theme", False)
pywal.util.Color.alpha_num = settings.get("alpha", "100")
image = pywal.image.get(os.path.join(WALL_DIR, wallpaper))
return pywal.colors.get(
image,
light=(is_file and light_theme),
backend=settings.get("backend", "wal"),
cache_dir=WPG_DIR
)
.set_active(settings.getboolean("light_theme", False))
self.wallpaper_switch\
.set_active(settings.getboolean("set_wallpaper", True))
self.smart_sort_switch\
.set_active(settings.getboolean("smart_sort", True))
self.auto_adjust_switch\
.set_active(settings.getboolean("auto_adjust", False))
self.editor_txt\
.set_text(settings.get("editor", "urxvt -e vim"))
self.command_txt\
.set_text(settings.get("command", "yes hi"))
self.command_txt\
.set_editable(settings.getboolean("execute_cmd", False))
self.alpha_txt\
.set_text(settings.get("alpha", "100"))