How to use the wpgtk.data.config.settings.get function in wpgtk

To help you get started, we’ve selected a few wpgtk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github deviantfero / wpgtk / wpgtk / gui / option_grid.py View on Github external
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\
github deviantfero / wpgtk / wpgtk / data / color.py View on Github external
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
    )
github deviantfero / wpgtk / wpgtk / gui / option_grid.py View on Github external
.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"))