# -*- coding: utf-8 -*- """An example compilation module.""" from theme_builder.color import Color from theme_builder.compilation import Compilation comp = Compilation("Lyte-Solarized-Light") comp.copy_all("Lyte-Solarized") new_options = { # Colors "fg": Color("#002b36"), "bg": Color("#fdf6e3"), "max_fg": Color("#657b83"), "max_bg": Color("#839496"), } for x in new_options: comp.options[x] = new_options[x]
# -*- coding: utf-8 -*- """An example compilation module.""" from theme_builder.compilation import Compilation comp = Compilation("Lyte") comp.copy_all("Lyte-Dark")
def compile_scripted_compilation(name, directory, package, key="comp"): """Compiles a script-based Compilation""" compilation = Compilation.get_by_name(name, key) compilation.export(directory, package)
# -*- coding: utf-8 -*- """Create a Light version of our Lyte-Dark theme.""" from theme_builder.color import Color from theme_builder.compilation import Compilation # Create our compilation with a unique name comp = Compilation("Lyte-Light") # Copy everything from the given theme name comp.copy_all("Lyte-Monokai") # Use the light icons comp.theme.set_iconset("Lyte-Light") # Modified theme options - we really just flip the background and foreground colors # The theme processor will take care of everything else new_options = { # Base Colors "fg": Color(16, 16, 16), "bg": Color(250, 250, 250), "max_fg": Color(120, 120, 120), "max_bg": Color(128, 128, 128), } for x in new_options: comp.options[x] = new_options[x] # Need more info as to what's going on? Check out this theme's parent theme, Lyte-Dark
# -*- coding: utf-8 -*- """An example compilation module.""" from theme_builder.color import Color from theme_builder.compilation import Compilation comp = Compilation("Lyte-Solarized") comp.copy_all("Lyte-Monokai") new_options = { # Colors "bg": Color("#002b36"), "fg": Color("#fdf6e3"), "max_bg": Color("#657b83"), "max_fg": Color("#839496"), "red": Color("#dc322f"), "orange": Color("#cb4b16"), "yellow": Color("#b58900"), "green": Color("#859900"), "cyan": Color("#2aa198"), "blue": Color("#268bd2"), "indigo": Color("#6c71c4"), "brown": Color("#d33682"), } for x in new_options: comp.options[x] = new_options[x]
from theme_builder.theme import Theme, theme_dir, icons_dir, basic_theme_templates 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"])
# -*- coding: utf-8 -*- """The base Lyte Theme.""" from theme_builder.theme import Theme, theme_dir, icons_dir, basic_theme_templates 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"]
from theme_builder.theme import Theme, theme_dir, icons_dir, basic_theme_templates 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-Dark", icons_dir("Lyte"), theme_dir("Lyte"), basic_theme_templates("Lyte", "Lyte-Dark")) # Initialize our color scheme - see the ColorScheme class for details color_scheme = ColorScheme( "Lyte-Dark", color_scheme_dir("Lyte-Old"), basic_color_scheme_templates("Lyte-Old", "Lyte-Dark")) # Create our compilation using the new theme and color scheme comp = Compilation("Lyte-Dark", 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"])