How to use the wpgtk.data.config.settings.getboolean 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\
            .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"))
github deviantfero / wpgtk / wpgtk / data / themer.py View on Github external
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)
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\
            .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\
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\
            .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"))