How to use the wpgtk.data.config.user_keywords.items 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 / keyword_grid.py View on Github external
def reload_keyword_list(self):
        self.liststore.clear()
        for k, v in user_keywords.items():
            self.liststore.append([k, v])
github deviantfero / wpgtk / wpgtk / data / color.py View on Github external
base_color = cdic["colors"]["color%s" % index]
    color_list = list(cdic["colors"].values())

    all_colors = {
        "wallpaper": cdic["wallpaper"],
        "alpha": cdic["alpha"],
        **cdic["special"],
        **cdic["colors"],
        **add_icon_colors(cdic),
        **keyword_colors(base_color, is_dark_theme(color_list))
    }

    try:
        user_words = {k: v.format(**all_colors)
                      for k, v in user_keywords.items()}
        all_colors = {**all_colors, **user_words}

    except KeyError as e:
        logging.error("%s - invalid, use double {{}} "
                      "to escape curly braces" % e)

    return {k: pywal.util.Color(v) for k, v in all_colors.items()}