Example #1
0
# Initialize our theme - see the Theme class for details
theme = Theme("Lyte-Monokai", icons_dir("Lyte"), theme_dir("Lyte"),
              basic_theme_templates("Lyte", "Lyte-Monokai"))

# Initialize our color scheme - see the ColorScheme class for details
color_scheme = ColorScheme(
    "Lyte-Monokai", color_scheme_dir("Lyte"),
    basic_color_scheme_templates("Lyte", "Lyte-Monokai"))

# Create our compilation using the new theme and color scheme
comp = Compilation("Lyte-Monokai", theme, color_scheme)

# Load our options from options.py, this file is huge enough as-is
from .options import options
comp.options = options


# Define our options preprocessor - we have a lot of options
# that need to be built on top of the expected base options for this theme and
# the used templates
def preprocessor(opts):
    """The preprocessor for the Lyte-Dark theme compilation."""

    # Format our tab options
    opts["tab_padding"] = "[{0}, {1}]".format(opts["tab_padding_x"],
                                              opts["tab_padding_y"])
    opts["tab_height"] = (opts["tab_padding_y"] *
                          2) + opts["text_height"] + opts["borders"]

    # Selection a more $fg version of $bg for highlighting
Example #2
0
from theme_builder.color_scheme import ColorScheme, basic_color_scheme_templates, color_scheme_dir
from theme_builder.color import Color
from theme_builder.compilation import Compilation

# Initialize our theme - see the Theme class for details
theme = Theme("Lyte-Monokai", icons_dir("Lyte"), theme_dir("Lyte"), basic_theme_templates("Lyte", "Lyte-Monokai"))

# Initialize our color scheme - see the ColorScheme class for details
color_scheme = ColorScheme("Lyte-Monokai", color_scheme_dir("Lyte"), basic_color_scheme_templates("Lyte", "Lyte-Monokai"))

# Create our compilation using the new theme and color scheme
comp = Compilation("Lyte-Monokai", theme, color_scheme)

# Load our options from options.py, this file is huge enough as-is
from .options import options
comp.options = options

# Define our options preprocessor - we have a lot of options
# that need to be built on top of the expected base options for this theme and
# the used templates
def preprocessor(opts):
    """The preprocessor for the Lyte-Dark theme compilation."""

    # Format our tab options
    opts["tab_padding"] = "[{0}, {1}]".format(opts["tab_padding_x"], opts["tab_padding_y"])
    opts["tab_height"] = (opts["tab_padding_y"] * 2) + opts["text_height"] + opts["borders"]

    # Selection a more $fg version of $bg for highlighting
    if "selection" not in opts:
        opts["selection"] = opts["bg"].blend(opts["fg"], 0.2)