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\
.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"))
def set_theme(wallpaper, colorscheme, restore=False):
"""apply a given wallpaper and a given colorscheme"""
use_vte = settings.getboolean("vte", False)
is_file = path.isdir(colorscheme) or path.isfile(colorscheme)
target = colorscheme if is_file else path.join(WALL_DIR, colorscheme)
set_wall = settings.getboolean("set_wallpaper", True)
reload_all = settings.getboolean("reload", True)
colors = color.get_pywal_dict(target, is_file)
pywal.sequences.send(colors, WPG_DIR, vte_fix=use_vte)
if not restore:
pywal.export.every(colors, FORMAT_DIR)
color.apply_colorscheme(colors)
if reload_all:
reload.all()
else:
reload.xrdb()
if set_wall:
filepath = path.join(WALL_DIR, wallpaper)
set_wall = filepath if path.isfile(filepath) else colors["wallpaper"]
pywal.wallpaper.change(set_wall)
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\
.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\
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\
.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"))