From a171613f3f7e2d89bc9385439e46237187c70425 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 20:34:52 -0600 Subject: [PATCH 01/13] Delay letting '_have_debugger' return True until Debugger is fully initialized --- pudb/debugger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pudb/debugger.py b/pudb/debugger.py index e074dff0..eed2b714 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -190,7 +190,6 @@ def __init__(self, stdin=None, stdout=None, term_size=None, steal_output=False, if Debugger._current_debugger: raise ValueError("a Debugger instance already exists") - self._current_debugger.append(self) # Pass remaining kwargs to python debugger framework bdb.Bdb.__init__(self, **kwargs) @@ -210,6 +209,9 @@ def __init__(self, stdin=None, stdout=None, term_size=None, steal_output=False, for bpoint_descr in load_breakpoints(): self.set_break(*bpoint_descr) + # Okay, now we have a debugger + self._current_debugger.append(self) + def __del__(self): assert self._current_debugger == [self] self._current_debugger.pop() From 4bd459f5a165057541981fe7e40a66f0d994bf20 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 20:35:31 -0600 Subject: [PATCH 02/13] Give each theme its own file --- pudb/settings.py | 2 +- pudb/theme.py | 637 +------------------------------------ pudb/themes/__init__.py | 21 ++ pudb/themes/agr_256.py | 84 +++++ pudb/themes/classic.py | 56 ++++ pudb/themes/dark_vim.py | 52 +++ pudb/themes/midnight.py | 93 ++++++ pudb/themes/mono.py | 7 + pudb/themes/monokai.py | 68 ++++ pudb/themes/monokai_256.py | 89 ++++++ pudb/themes/solarized.py | 55 ++++ pudb/themes/utils.py | 21 ++ pudb/themes/vim.py | 64 ++++ 13 files changed, 627 insertions(+), 622 deletions(-) create mode 100644 pudb/themes/__init__.py create mode 100644 pudb/themes/agr_256.py create mode 100644 pudb/themes/classic.py create mode 100644 pudb/themes/dark_vim.py create mode 100644 pudb/themes/midnight.py create mode 100644 pudb/themes/mono.py create mode 100644 pudb/themes/monokai.py create mode 100644 pudb/themes/monokai_256.py create mode 100644 pudb/themes/solarized.py create mode 100644 pudb/themes/utils.py create mode 100644 pudb/themes/vim.py diff --git a/pudb/settings.py b/pudb/settings.py index 9c19a047..d4ab9923 100644 --- a/pudb/settings.py +++ b/pudb/settings.py @@ -302,7 +302,7 @@ def _update_config(check_box, new_state, option_newvalue): # {{{ themes - from pudb.theme import THEMES + from pudb.themes import THEMES known_theme = conf_dict["theme"] in THEMES diff --git a/pudb/theme.py b/pudb/theme.py index 482ab2d5..04bd207f 100644 --- a/pudb/theme.py +++ b/pudb/theme.py @@ -23,22 +23,13 @@ THE SOFTWARE. """ +import urwid + from dataclasses import dataclass, astuple, replace from typing import Optional from pudb.lowlevel import ui_log - -THEMES = [ - "classic", - "vim", - "dark vim", - "midnight", - "solarized", - "agr-256", - "monokai", - "monokai-256", - "mono", -] - +from pudb.themes.utils import add_setting, link, inheritance_overrides, reset_inheritance_overrides +from pudb.themes import THEMES @dataclass class PaletteEntry: @@ -234,8 +225,8 @@ def handle_256_colors(self): } -def get_style(palette_dict: dict, style_name: str, - inheritance_overrides: dict) -> dict: +def set_style(palette_dict: dict, style_name: str, + inheritance_overrides: dict) -> PaletteEntry: """ Recursively search up the style hierarchy for the first style which has been defined, and add it to the palette_dict under the given style_name. @@ -253,7 +244,7 @@ def get_style(palette_dict: dict, style_name: str, INHERITANCE_MAP[style_name], ) style = replace( - get_style(palette_dict, parent_name, inheritance_overrides), + set_style(palette_dict, parent_name, inheritance_overrides), name=style_name ) palette_dict[style_name] = style @@ -262,614 +253,18 @@ def get_style(palette_dict: dict, style_name: str, # }}} +# {{{ get palette + def get_palette(may_use_fancy_formats: bool, theme: str = "classic") -> list: """ Load the requested theme and return a list containing all palette entries needed to highlight the debugger UI, including syntax highlighting. """ - inheritance_overrides = {} - - if may_use_fancy_formats: - def add_setting(color, setting): - return f"{color}, {setting}" - else: - def add_setting(color, setting): - return color - - def link(child: str, parent: str): - inheritance_overrides[child] = parent - - # {{{ themes + reset_inheritance_overrides() - if theme == "classic": - # {{{ classic theme - link("current breakpoint", "current frame name") - link("focused current breakpoint", "focused current frame name") - - palette_dict = { - # {{{ base styles - "background": ("black", "light gray"), - "selectable": ("black", "dark cyan"), - "focused selectable": ("black", "light cyan"), - "highlighted": ("dark blue", "yellow"), - "hotkey": (add_setting("black", "underline"), "light gray"), - # }}} - # {{{ general ui - "header": ("dark blue", "light gray"), - "dialog title": (add_setting("white", "bold"), "dark blue"), - "warning": (add_setting("white", "bold"), "dark red"), - # }}} - # {{{ source view - "source": ("yellow", "dark blue"), - "current source": ("dark blue", "dark green"), - "breakpoint source": ( - add_setting("yellow", "bold"), "dark red"), - "line number": ("light gray", "dark blue"), - "breakpoint marker": ( - add_setting("dark red", "bold"), "dark blue"), - # }}} - # {{{ sidebar - "sidebar two": ("dark blue", "dark cyan"), - "sidebar three": ("dark gray", "dark cyan"), - "focused sidebar two": ("dark blue", "light cyan"), - "focused sidebar three": ("dark gray", "light cyan"), - # }}} - # {{{ variables view - "return label": ("white", "dark blue"), - "focused return label": ("light gray", "dark blue"), - # }}} - # {{{ stack - "current frame name": ( - add_setting("white", "bold"), "dark cyan"), - "focused current frame name": ( - add_setting("black", "bold"), "light cyan"), - # }}} - # {{{ shell - "command line output": ("light cyan", "dark blue"), - "command line prompt": ( - add_setting("white", "bold"), "dark blue"), - "command line error": ( - add_setting("light green", "bold"), "dark blue"), - "command line clear button": ( - add_setting("white", "bold"), "dark blue"), - "command line focused button": ("dark blue", "dark cyan"), - # }}} - # {{{ Code syntax - "keyword": (add_setting("white", "bold"), "dark blue"), - "function": ("light cyan", "dark blue"), - "literal": (add_setting("light green", "bold"), "dark blue"), - "punctuation": ("light gray", "dark blue"), - "comment": ("dark cyan", "dark blue"), - # }}} - } - # }}} - elif theme == "vim": - # {{{ vim theme - link("current breakpoint", "current frame name") - link("focused current breakpoint", "focused current frame name") - - palette_dict = { - # {{{ base styles - "background": ("black", "light gray"), - "selectable": ("black", "dark cyan"), - "focused selectable": ("black", "light cyan"), - "hotkey": (add_setting("black", "bold, underline"), "light gray"), - "highlighted": ("black", "yellow"), - # }}} - # {{{ general ui - "header": (add_setting("black", "bold"), "light gray"), - "group head": ("dark blue", "light gray"), - "dialog title": (add_setting("white", "bold"), "dark blue"), - "input": ("black", "dark cyan"), - "focused input": ("black", "light cyan"), - "warning": (add_setting("dark red", "bold"), "white"), - "header warning": (add_setting("dark red", "bold"), "light gray"), - # }}} - # {{{ source view - "source": ("black", "white"), - "current source": ("black", "dark cyan"), - "breakpoint source": ("dark red", "light gray"), - "line number": ("dark gray", "white"), - "current line marker": ("dark red", "white"), - "breakpoint marker": ("dark red", "white"), - # }}} - # {{{ sidebar - "sidebar one": ("black", "dark cyan"), - "sidebar two": ("dark blue", "dark cyan"), - "sidebar three": ("dark gray", "dark cyan"), - "focused sidebar one": ("black", "light cyan"), - "focused sidebar two": ("dark blue", "light cyan"), - "focused sidebar three": ("dark gray", "light cyan"), - # }}} - # {{{ variables view - "highlighted var label": ("dark blue", "yellow"), - "return label": ("white", "dark blue"), - "focused return label": ("light gray", "dark blue"), - # }}} - # {{{ stack - "current frame name": ( - add_setting("white", "bold"), "dark cyan"), - "focused current frame name": ( - add_setting("black", "bold"), "light cyan"), - # }}} - # {{{ shell - "command line output": ( - add_setting("dark gray", "bold"), "white"), - # }}} - # {{{ Code syntax - "keyword2": ("dark magenta", "white"), - "namespace": ("dark magenta", "white"), - "literal": ("dark red", "white"), - "exception": ("dark red", "white"), - "comment": ("dark gray", "white"), - "function": ("dark blue", "white"), - "pseudo": ("dark gray", "white"), - "builtin": ("light blue", "white"), - # }}} - } - # }}} - elif theme == "dark vim": - # {{{ dark vim - - link("current breakpoint", "current frame name") - link("focused current breakpoint", "focused current frame name") - palette_dict = { - # {{{ base styles - "background": ("black", "light gray"), - "selectable": ("white", "dark gray"), - "focused selectable": (add_setting("white", "bold"), "light blue"), - "highlighted": ("black", "dark green"), - "hotkey": (add_setting("dark blue", "underline"), "light gray"), - # }}} - # {{{ general ui - "header": ("dark blue", "light gray"), - "dialog title": (add_setting("white", "bold"), "black"), - "warning": (add_setting("light red", "bold"), "black"), - "header warning": (add_setting("light red", "bold"), "light gray"), - # }}} - # {{{ source view - "source": ("white", "black"), - "current source": (add_setting("white", "bold"), "dark gray"), - "line number": (add_setting("dark gray", "bold"), "black"), - "breakpoint marker": (add_setting("light red", "bold"), "black"), - "breakpoint source": (add_setting("white", "bold"), "dark red"), - # }}} - # {{{ sidebar - "sidebar two": ("yellow", "dark gray"), - "focused sidebar two": ("light cyan", "light blue"), - "sidebar three": ("light gray", "dark gray"), - "focused sidebar three": ("yellow", "light blue"), - # }}} - # {{{ stack - "current frame name": ( - add_setting("white", "bold"), "dark gray"), - # }}} - # {{{ shell - "command line output": (add_setting("yellow", "bold"), "black"), - # }}} - # {{{ Code syntax - "keyword": ("yellow", "black"), - "literal": ("light magenta", "black"), - "function": (add_setting("light cyan", "bold"), "black"), - "punctuation": ("yellow", "black"), - "comment": ("dark cyan", "black"), - "exception": ("light red", "black"), - "builtin": ("light green", "black"), - "pseudo": ("dark green", "black"), - # }}} - } - # }}} - elif theme == "midnight": - # {{{ midnight - - # Based on XCode's midnight theme - # Looks best in a console with green text against black background - link("current breakpoint", "current frame name") - link("focused current breakpoint", "focused current frame name") - palette_dict = { - # {{{ base styles - "background": ("black", "light gray"), - "selectable": ("white", "black"), - "focused selectable": ("white", "dark blue"), - "hotkey": (add_setting("black", "underline, italics"), "light gray"), - "highlighted": ("black", "dark green"), - # }}} - # {{{ general ui - "input": ("light green", "black"), - "focused input": ("light green", "black"), - "warning": (add_setting("white", "bold"), "dark red"), - "dialog title": (add_setting("white", "bold"), "dark blue"), - "group head": (add_setting("dark blue", "bold"), "light gray"), - "button": (add_setting("white", "bold"), "dark blue"), - "focused button": ("white", "black"), - "focused sidebar": ("black", "white"), - "value": (add_setting("yellow", "bold"), "dark blue"), - # }}} - # {{{ source view - "source": ("light green", "black"), - "highlighted source": ("black", "dark green"), - "current source": ("black", "brown"), - "current focused source": (add_setting("yellow", "bold"), "dark blue"), - "breakpoint source": (add_setting("yellow", "bold"), "dark red"), - "current breakpoint source": ("black", "dark red"), - - "line number": ("light gray", "black"), - "current line marker": ("dark red", "black"), - "breakpoint marker": ("dark red", "black"), - # }}} - # {{{ sidebar - "sidebar two": ("light blue", "black"), - "sidebar three": ("light cyan", "black"), - # }}} - # {{{ variables view - "return label": ("white", "dark blue"), - "return value": ("black", "dark cyan"), - "focused return label": ("light gray", "dark blue"), - # }}} - # {{{ stack - "current frame name": (add_setting("white", "bold"), "black"), - "current frame class": (add_setting("light blue", "bold"), "black"), - "current frame location": (add_setting("light cyan", "bold"), "black"), - - "focused current frame name": ( - add_setting("white", "bold"), "dark blue"), - "focused current frame class": ( - add_setting("white", "bold"), "dark blue"), - "focused current frame location": ( - add_setting("white", "bold"), "dark blue"), - # }}} - # {{{ breakpoints view - "breakpoint": ("white", "black"), - "disabled breakpoint": ("dark gray", "black"), - "focused disabled breakpoint": ("light gray", "dark blue"), - "current breakpoint": (add_setting("white", "bold"), "black"), - "disabled current breakpoint": ( - add_setting("dark gray", "bold"), "black"), - "focused current breakpoint": ( - add_setting("white", "bold"), "dark blue"), - "focused disabled current breakpoint": ( - add_setting("light gray", "bold"), "dark blue"), - # }}} - # {{{ shell - "command line edit": ("white", "black"), - "command line prompt": (add_setting("white", "bold"), "black"), - - "command line input": ("white", "black"), - "command line error": (add_setting("light red", "bold"), "black"), - - "command line clear button": (add_setting("white", "bold"), "black"), - "command line focused button": ("white", "dark blue"), - # }}} - # {{{ Code syntax - "keyword": ("dark magenta", "black"), - "operator": ("dark green", "black"), - "pseudo": ("light magenta", "black"), - "function": (add_setting("light blue", "bold"), "black"), - "builtin": ("dark gray", "black"), - "literal": ("dark cyan", "black"), - "string": ("dark red", "black"), - "docstring": ("yellow", "black"), - "backtick": ("dark green", "black"), - "punctuation": ("white", "black"), - "comment": ("white", "black"), - "exception": ("dark green", "black"), - # }}} - } - - # }}} - elif theme == "solarized": - # {{{ solarized - palette_dict = { - # {{{ base styles - "background": ("light green", "light gray"), - "selectable": ("light green", "white"), - "focused selectable": ("white", "dark blue"), - "highlighted": ("white", "dark cyan"), - "hotkey": (add_setting("black", "underline"), "light gray"), - # }}} - # {{{ general ui - "dialog title": (add_setting("white", "bold"), "dark cyan"), - "warning": (add_setting("light red", "bold"), "white"), - "header warning": (add_setting("light red", "bold"), "light gray"), - "focused sidebar": ("dark red", "light gray"), - "group head": (add_setting("yellow", "bold"), "light gray"), - # }}} - # {{{ source view - "source": ("yellow", "white"), - "breakpoint source": ("light red", "light gray"), - "current source": ("light gray", "light blue"), - "line number": ("light blue", "white"), - "current line marker": ( - add_setting("light blue", "bold"), "white"), - "breakpoint marker": ( - add_setting("light red", "bold"), "white"), - # }}} - # {{{ sidebar - "sidebar two": ("dark blue", "white"), - "sidebar three": ("light cyan", "white"), - "focused sidebar three": ("light gray", "dark blue"), - # }}} - # {{{ variables view - "return label": ("white", "yellow"), - "focused return label": ("white", "yellow"), - # }}} - # {{{ stack - "current frame name": ( - add_setting("light green", "bold"), "white"), - "focused current frame name": ( - add_setting("white", "bold"), "dark blue"), - # }}} - # {{{ shell - "command line output": ("light green", "white"), - # }}} - # {{{ Code syntax - "namespace": ("dark red", "white"), - "exception": ("light red", "white"), - "keyword": ("brown", "white"), - "keyword2": ("dark magenta", "white"), - "function": ("dark green", "white"), - "literal": ("dark cyan", "white"), - "builtin": ("dark blue", "white"), - "comment": ("light cyan", "white"), - "pseudo": ("light cyan", "white"), - # }}} - } - - # }}} - elif theme == "agr-256": - # {{{ agr-256 - - # Give the colors some comprehensible names - black = "h235" - blacker = "h233" - dark_cyan = "h24" - dark_gray = "h241" - dark_green = "h22" - dark_red = "h88" - dark_teal = "h23" - light_blue = "h111" - light_cyan = "h80" - light_gray = "h252" - light_green = "h113" - light_red = "h160" - medium_gray = "h246" - salmon = "h223" - orange = "h173" - white = "h255" - yellow = "h192" - - link("focused breakpoint", "focused selectable") - link("current breakpoint", "current frame name") - link("focused current breakpoint", "focused current frame name") - palette_dict = { - # {{{ base styles - "background": (black, light_gray), - "selectable": (white, blacker), - "focused selectable": (yellow, dark_cyan), - "hotkey": (add_setting(black, "underline"), light_gray), - "highlighted": (white, dark_green), - # }}} - # {{{ general ui - "focused sidebar": (dark_cyan, light_gray), - "group head": (add_setting(dark_cyan, "bold"), light_gray), - "dialog title": (add_setting(light_gray, "bold"), black), - "warning": (add_setting(white, "bold"), dark_red), - "fixed value": (add_setting(white, "bold"), dark_gray), - "button": (add_setting(white, "bold"), black), - "focused button": (add_setting(yellow, "bold"), dark_cyan), - # }}} - # {{{ source view - "line number": (dark_gray, black), - "current line marker": (add_setting(yellow, "bold"), black), - "breakpoint marker": (add_setting(light_red, "bold"), black), - "source": (white, black), - "breakpoint source": (add_setting(white, "bold"), dark_red), - "current source": (add_setting(light_gray, "bold"), dark_teal), - # }}} - # {{{ sidebar - "sidebar two": (light_blue, blacker), - "focused sidebar two": (light_gray, dark_cyan), - "sidebar three": (medium_gray, blacker), - "focused sidebar three": (salmon, dark_cyan), - # }}} - # {{{ variables view - "highlighted var label": (light_gray, dark_green), - "return label": (light_green, blacker), - "focused return label": ( - add_setting(light_gray, "bold"), dark_cyan), - # }}} - # {{{ stack - "current frame name": (yellow, blacker), - "focused current frame name": ( - add_setting(yellow, "bold"), dark_cyan), - # }}} - # {{{ shell - "command line prompt": (add_setting(yellow, "bold"), black), - "command line output": (light_cyan, black), - "command line error": (light_red, black), - # }}} - # {{{ Code syntax - "comment": (medium_gray, black), - "exception": (orange, black), - "function": (yellow, black), - "keyword": (light_blue, black), - "literal": (orange, black), - "operator": (yellow, black), - "pseudo": (medium_gray, black), - "punctuation": (salmon, black), - "string": (light_green, black), - # }}} - } - # }}} - elif theme == "monokai": - # {{{ monokai - link("current breakpoint", "current frame name") - link("focused current breakpoint", "focused current frame name") - palette_dict = { - # {{{ base styles - "background": ("black", "light gray"), - "selectable": ("white", "black"), - "focused selectable": ("white", "dark gray"), - "highlighted": ("black", "dark green"), - "hotkey": (add_setting("black", "underline"), "light gray"), - # }}} - # {{{ general ui - "input": ("white", "black"), - "button": (add_setting("white", "bold"), "black"), - "focused button": (add_setting("white", "bold"), "dark gray"), - "focused sidebar": ("dark blue", "light gray"), - "warning": (add_setting("white", "bold"), "dark red"), - "group head": (add_setting("black", "bold"), "light gray"), - "dialog title": (add_setting("white", "bold"), "black"), - # }}} - # {{{ source view - "current source": ("black", "dark cyan"), - "breakpoint source": (add_setting("white", "bold"), "dark red"), - "line number": ("dark gray", "black"), - "current line marker": (add_setting("dark cyan", "bold"), "black"), - "breakpoint marker": (add_setting("dark red", "bold"), "black"), - # }}} - # {{{ sidebar - "sidebar two": ("light cyan", "black"), - "focused sidebar two": ("light cyan", "dark gray"), - "sidebar three": ("light magenta", "black"), - "focused sidebar three": ("light magenta", "dark gray"), - # }}} - # {{{ variables view - "return label": ("light green", "black"), - "focused return label": ("light green", "dark gray"), - # }}} - # {{{ stack - "current frame name": ("light green", "black"), - "focused current frame name": ("light green", "dark gray"), - # }}} - # {{{ shell - "command line prompt": (add_setting("yellow", "bold"), "black"), - "command line output": ("light cyan", "black"), - "command line error": ("yellow", "black"), - "focused command line output": ("light cyan", "dark gray"), - "focused command line error": ( - add_setting("yellow", "bold"), "dark gray"), - # }}} - # {{{ Code syntax - "literal": ("light magenta", "black"), - "builtin": ("light cyan", "black"), - "exception": ("light cyan", "black"), - "keyword2": ("light cyan", "black"), - "function": ("light green", "black"), - "class": (add_setting("light green", "underline"), "black"), - "keyword": ("light red", "black"), - "operator": ("light red", "black"), - "comment": ("dark gray", "black"), - "docstring": ("dark gray", "black"), - "argument": ("brown", "black"), - "pseudo": ("brown", "black"), - "string": ("yellow", "black"), - # }}} - } - - # }}} - elif theme == "monokai-256": - # {{{ monokai-256 - - # Give the colors some comprehensible names - black = "h236" - blacker = "h234" - dark_gray = "h240" - dark_green = "h28" - dark_red = "h124" - dark_teal = "h30" - dark_magenta = "h141" - light_blue = "h111" - light_cyan = "h51" - light_gray = "h252" - light_green = "h155" - light_red = "h160" - light_magenta = "h198" - medium_gray = "h243" - orange = "h208" - white = "h255" - yellow = "h228" - link("current breakpoint", "current frame name") - link("focused current breakpoint", "focused current frame name") - palette_dict = { - - # {{{ base styles - "background": (black, light_gray), - "selectable": (white, blacker), - "focused selectable": (white, dark_gray), - "highlighted": (white, dark_green), - "hotkey": (add_setting(black, "underline"), light_gray), - # }}} - # {{{ general ui - "input": (white, black), - "button": (add_setting(white, "bold"), black), - "focused button": (add_setting(white, "bold"), dark_gray), - "focused sidebar": (dark_teal, light_gray), - "warning": (add_setting(white, "bold"), dark_red), - "group head": (add_setting(black, "bold"), light_gray), - "dialog title": (add_setting(white, "bold"), blacker), - # }}} - # {{{ source view - "source": (white, black), - "current source": (add_setting(light_gray, "bold"), dark_teal), - "breakpoint source": (add_setting(white, "bold"), dark_red), - "line number": (dark_gray, black), - "current line marker": (add_setting(light_cyan, "bold"), black), - "breakpoint marker": (add_setting(light_red, "bold"), black), - # }}} - # {{{ sidebar - "sidebar two": (light_cyan, blacker), - "focused sidebar two": (light_cyan, dark_gray), - "sidebar three": (dark_magenta, blacker), - "focused sidebar three": (dark_magenta, dark_gray), - # }}} - # {{{ variables view - "highlighted var label": (light_gray, dark_green), - "return label": (light_green, blacker), - "focused return label": (light_green, dark_gray), - # }}} - # {{{ stack - "current frame name": (light_green, blacker), - "focused current frame name": (light_green, dark_gray), - # }}} - # {{{ shell - "command line prompt": ( - add_setting(yellow, "bold"), black), - "command line output": (light_cyan, black), - "command line error": (orange, black), - "focused command line output": (light_cyan, dark_gray), - "focused command line error": ( - add_setting(orange, "bold"), dark_gray), - # }}} - # {{{ Code syntax - "literal": (dark_magenta, black), - "builtin": (light_cyan, black), - "exception": (light_cyan, black), - "keyword2": (light_cyan, black), - "function": (light_green, black), - "class": (add_setting(light_green, "underline"), black), - "keyword": (light_magenta, black), - "operator": (light_magenta, black), - "comment": (medium_gray, black), - "docstring": (medium_gray, black), - "argument": (orange, black), - "pseudo": (orange, black), - "string": (yellow, black), - # }}} - } - # }}} - elif theme == "mono": - # {{{ mono - palette_dict = { - "background": ("standout",), - "selectable": (), - "focused selectable": ("underline",), - "highlighted": ("bold",), - "hotkey": ("underline, standout",), - } - # }}} - else: + try: + palette_dict = THEMES[theme] + except KeyError: # {{{ custom try: # {{{ base styles @@ -904,11 +299,9 @@ def link(child: str, parent: str): return None # }}} - # }}} - # Apply style inheritance for style_name in set(INHERITANCE_MAP.keys()).union(BASE_STYLES.keys()): - get_style(palette_dict, style_name, inheritance_overrides) + set_style(palette_dict, style_name, inheritance_overrides) palette_list = [ astuple(entry) @@ -918,4 +311,6 @@ def link(child: str, parent: str): return palette_list +# }}} + # vim: foldmethod=marker diff --git a/pudb/themes/__init__.py b/pudb/themes/__init__.py new file mode 100644 index 00000000..cfcbe221 --- /dev/null +++ b/pudb/themes/__init__.py @@ -0,0 +1,21 @@ +from .classic import palette_dict as Classic +from .agr_256 import palette_dict as Agr256 +from .solarized import palette_dict as Solarized +from .dark_vim import palette_dict as DarkVim +from .midnight import palette_dict as Midnight +from .mono import palette_dict as Mono +from .monokai import palette_dict as Monokai +from .monokai_256 import palette_dict as Monokai256 +from .vim import palette_dict as Vim + +THEMES = { + "classic": Classic, + "vim": Vim, + "dark vim": DarkVim, + "midnight": Midnight, + "monokai": Monokai, + "solarized": Solarized, + "mono": Mono, + "agr-256": Agr256, + "monokai-256": Monokai256, +} diff --git a/pudb/themes/agr_256.py b/pudb/themes/agr_256.py new file mode 100644 index 00000000..e16cc67b --- /dev/null +++ b/pudb/themes/agr_256.py @@ -0,0 +1,84 @@ +from pudb.themes.utils import add_setting, link + +# Give the colors some comprehensible names +black = "h235" +blacker = "h233" +dark_cyan = "h24" +dark_gray = "h241" +dark_green = "h22" +dark_red = "h88" +dark_teal = "h23" +light_blue = "h111" +light_cyan = "h80" +light_gray = "h252" +light_green = "h113" +light_red = "h160" +medium_gray = "h246" +salmon = "h223" +orange = "h173" +white = "h255" +yellow = "h192" + +link("focused breakpoint", "focused selectable") +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") + +palette_dict = { + # {{{ base styles + "background": (black, light_gray), + "selectable": (white, blacker), + "focused selectable": (yellow, dark_cyan), + "hotkey": (add_setting(black, "underline"), light_gray), + "highlighted": (white, dark_green), + # }}} + # {{{ general ui + "focused sidebar": (dark_cyan, light_gray), + "group head": (add_setting(dark_cyan, "bold"), light_gray), + "dialog title": (add_setting(light_gray, "bold"), black), + "warning": (add_setting(white, "bold"), dark_red), + "fixed value": (add_setting(white, "bold"), dark_gray), + "button": (add_setting(white, "bold"), black), + "focused button": (add_setting(yellow, "bold"), dark_cyan), + # }}} + # {{{ source view + "line number": (dark_gray, black), + "current line marker": (add_setting(yellow, "bold"), black), + "breakpoint marker": (add_setting(light_red, "bold"), black), + "source": (white, black), + "breakpoint source": (add_setting(white, "bold"), dark_red), + "current source": (add_setting(light_gray, "bold"), dark_teal), + # }}} + # {{{ sidebar + "sidebar two": (light_blue, blacker), + "focused sidebar two": (light_gray, dark_cyan), + "sidebar three": (medium_gray, blacker), + "focused sidebar three": (salmon, dark_cyan), + # }}} + # {{{ variables view + "highlighted var label": (light_gray, dark_green), + "return label": (light_green, blacker), + "focused return label": (add_setting(light_gray, "bold"), dark_cyan), + # }}} + # {{{ stack + "current frame name": (yellow, blacker), + "focused current frame name": (add_setting(yellow, "bold"), dark_cyan), + # }}} + # {{{ shell + "command line prompt": (add_setting(yellow, "bold"), black), + "command line output": (light_cyan, black), + "command line error": (light_red, black), + # }}} + # {{{ Code syntax + "comment": (medium_gray, black), + "exception": (orange, black), + "function": (yellow, black), + "keyword": (light_blue, black), + "literal": (orange, black), + "operator": (yellow, black), + "pseudo": (medium_gray, black), + "punctuation": (salmon, black), + "string": (light_green, black), + # }}} +} + +# vim: foldmethod=marker diff --git a/pudb/themes/classic.py b/pudb/themes/classic.py new file mode 100644 index 00000000..b1c584e8 --- /dev/null +++ b/pudb/themes/classic.py @@ -0,0 +1,56 @@ +from pudb.themes.utils import add_setting, link + +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") + +palette_dict = { + # {{{ base styles + "background": ("black", "light gray"), + "selectable": ("black", "dark cyan"), + "focused selectable": ("black", "light cyan"), + "highlighted": ("dark blue", "yellow"), + "hotkey": (add_setting("black", "underline"), "light gray"), + # }}} + # {{{ general ui + "header": ("dark blue", "light gray"), + "dialog title": (add_setting("white", "bold"), "dark blue"), + "warning": (add_setting("white", "bold"), "dark red"), + # }}} + # {{{ source view + "source": ("yellow", "dark blue"), + "current source": ("dark blue", "dark green"), + "breakpoint source": (add_setting("yellow", "bold"), "dark red"), + "line number": ("light gray", "dark blue"), + "breakpoint marker": (add_setting("dark red", "bold"), "dark blue"), + # }}} + # {{{ sidebar + "sidebar two": ("dark blue", "dark cyan"), + "sidebar three": ("dark gray", "dark cyan"), + "focused sidebar two": ("dark blue", "light cyan"), + "focused sidebar three": ("dark gray", "light cyan"), + # }}} + # {{{ variables view + "return label": ("white", "dark blue"), + "focused return label": ("light gray", "dark blue"), + # }}} + # {{{ stack + "current frame name": (add_setting("white", "bold"), "dark cyan"), + "focused current frame name": (add_setting("black", "bold"), "light cyan"), + # }}} + # {{{ shell + "command line output": ("light cyan", "dark blue"), + "command line prompt": (add_setting("white", "bold"), "dark blue"), + "command line error": (add_setting("light green", "bold"), "dark blue"), + "command line clear button": (add_setting("white", "bold"), "dark blue"), + "command line focused button": ("dark blue", "dark cyan"), + # }}} + # {{{ Code syntax + "keyword": (add_setting("white", "bold"), "dark blue"), + "function": ("light cyan", "dark blue"), + "literal": (add_setting("light green", "bold"), "dark blue"), + "punctuation": ("light gray", "dark blue"), + "comment": ("dark cyan", "dark blue"), + # }}} +} + +# vim: foldmethod=marker diff --git a/pudb/themes/dark_vim.py b/pudb/themes/dark_vim.py new file mode 100644 index 00000000..bc403da6 --- /dev/null +++ b/pudb/themes/dark_vim.py @@ -0,0 +1,52 @@ +from pudb.themes.utils import add_setting, link + +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") + +palette_dict = { + # {{{ base styles + "background": ("black", "light gray"), + "selectable": ("white", "dark gray"), + "focused selectable": (add_setting("white", "bold"), "light blue"), + "highlighted": ("black", "dark green"), + "hotkey": (add_setting("dark blue", "underline"), "light gray"), + # }}} + # {{{ general ui + "header": ("dark blue", "light gray"), + "dialog title": (add_setting("white", "bold"), "black"), + "warning": (add_setting("light red", "bold"), "black"), + "header warning": (add_setting("light red", "bold"), "light gray"), + # }}} + # {{{ source view + "source": ("white", "black"), + "current source": (add_setting("white", "bold"), "dark gray"), + "line number": (add_setting("dark gray", "bold"), "black"), + "breakpoint marker": (add_setting("light red", "bold"), "black"), + "breakpoint source": (add_setting("white", "bold"), "dark red"), + # }}} + # {{{ sidebar + "sidebar two": ("yellow", "dark gray"), + "focused sidebar two": ("light cyan", "light blue"), + "sidebar three": ("light gray", "dark gray"), + "focused sidebar three": ("yellow", "light blue"), + # }}} + # {{{ stack + "current frame name": ( + add_setting("white", "bold"), "dark gray"), + # }}} + # {{{ shell + "command line output": (add_setting("yellow", "bold"), "black"), + # }}} + # {{{ Code syntax + "keyword": ("yellow", "black"), + "literal": ("light magenta", "black"), + "function": (add_setting("light cyan", "bold"), "black"), + "punctuation": ("yellow", "black"), + "comment": ("dark cyan", "black"), + "exception": ("light red", "black"), + "builtin": ("light green", "black"), + "pseudo": ("dark green", "black"), + # }}} +} + +# vim: foldmethod=marker diff --git a/pudb/themes/midnight.py b/pudb/themes/midnight.py new file mode 100644 index 00000000..944ea171 --- /dev/null +++ b/pudb/themes/midnight.py @@ -0,0 +1,93 @@ +from pudb.themes.utils import add_setting, link + +# Based on XCode's midnight theme +# Looks best in a console with green text against black background +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") + +palette_dict = { + # {{{ base styles + "background": ("black", "light gray"), + "selectable": ("white", "black"), + "focused selectable": ("white", "dark blue"), + "hotkey": (add_setting("black", "underline, italics"), "light gray"), + "highlighted": ("black", "dark green"), + # }}} + # {{{ general ui + "input": ("light green", "black"), + "focused input": ("light green", "black"), + "warning": (add_setting("white", "bold"), "dark red"), + "dialog title": (add_setting("white", "bold"), "dark blue"), + "group head": (add_setting("dark blue", "bold"), "light gray"), + "button": (add_setting("white", "bold"), "dark blue"), + "focused button": ("white", "black"), + "focused sidebar": ("black", "white"), + "value": (add_setting("yellow", "bold"), "dark blue"), + # }}} + # {{{ source view + "source": ("light green", "black"), + "highlighted source": ("black", "dark green"), + "current source": ("black", "brown"), + "current focused source": (add_setting("yellow", "bold"), "dark blue"), + "breakpoint source": (add_setting("yellow", "bold"), "dark red"), + "current breakpoint source": ("black", "dark red"), + + "line number": ("light gray", "black"), + "current line marker": ("dark red", "black"), + "breakpoint marker": ("dark red", "black"), + # }}} + # {{{ sidebar + "sidebar two": ("light blue", "black"), + "sidebar three": ("light cyan", "black"), + # }}} + # {{{ variables view + "return label": ("white", "dark blue"), + "return value": ("black", "dark cyan"), + "focused return label": ("light gray", "dark blue"), + # }}} + # {{{ stack + "current frame name": (add_setting("white", "bold"), "black"), + "current frame class": (add_setting("light blue", "bold"), "black"), + "current frame location": (add_setting("light cyan", "bold"), "black"), + + "focused current frame name": (add_setting("white", "bold"), "dark blue"), + "focused current frame class": (add_setting("white", "bold"), "dark blue"), + "focused current frame location": (add_setting("white", "bold"), "dark blue"), + # }}} + # {{{ breakpoints view + "breakpoint": ("white", "black"), + "disabled breakpoint": ("dark gray", "black"), + "focused disabled breakpoint": ("light gray", "dark blue"), + "current breakpoint": (add_setting("white", "bold"), "black"), + "disabled current breakpoint": (add_setting("dark gray", "bold"), "black"), + "focused current breakpoint": (add_setting("white", "bold"), "dark blue"), + "focused disabled current breakpoint": ( + add_setting("light gray", "bold"), "dark blue"), + # }}} + # {{{ shell + "command line edit": ("white", "black"), + "command line prompt": (add_setting("white", "bold"), "black"), + + "command line input": ("white", "black"), + "command line error": (add_setting("light red", "bold"), "black"), + + "command line clear button": (add_setting("white", "bold"), "black"), + "command line focused button": ("white", "dark blue"), + # }}} + # {{{ Code syntax + "keyword": ("dark magenta", "black"), + "operator": ("dark green", "black"), + "pseudo": ("light magenta", "black"), + "function": (add_setting("light blue", "bold"), "black"), + "builtin": ("dark gray", "black"), + "literal": ("dark cyan", "black"), + "string": ("dark red", "black"), + "docstring": ("yellow", "black"), + "backtick": ("dark green", "black"), + "punctuation": ("white", "black"), + "comment": ("white", "black"), + "exception": ("dark green", "black"), + # }}} +} + +# vim: foldmethod=marker diff --git a/pudb/themes/mono.py b/pudb/themes/mono.py new file mode 100644 index 00000000..cda607be --- /dev/null +++ b/pudb/themes/mono.py @@ -0,0 +1,7 @@ +palette_dict = { + "background": ("standout",), + "selectable": (), + "focused selectable": ("underline",), + "highlighted": ("bold",), + "hotkey": ("underline, standout",), +} diff --git a/pudb/themes/monokai.py b/pudb/themes/monokai.py new file mode 100644 index 00000000..13caeb36 --- /dev/null +++ b/pudb/themes/monokai.py @@ -0,0 +1,68 @@ +from pudb.themes.utils import add_setting, link + +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") + +palette_dict = { + # {{{ base styles + "background": ("black", "light gray"), + "selectable": ("white", "black"), + "focused selectable": ("white", "dark gray"), + "highlighted": ("black", "dark green"), + "hotkey": (add_setting("black", "underline"), "light gray"), + # }}} + # {{{ general ui + "input": ("white", "black"), + "button": (add_setting("white", "bold"), "black"), + "focused button": (add_setting("white", "bold"), "dark gray"), + "focused sidebar": ("dark blue", "light gray"), + "warning": (add_setting("white", "bold"), "dark red"), + "group head": (add_setting("black", "bold"), "light gray"), + "dialog title": (add_setting("white", "bold"), "black"), + # }}} + # {{{ source view + "current source": ("black", "dark cyan"), + "breakpoint source": (add_setting("white", "bold"), "dark red"), + "line number": ("dark gray", "black"), + "current line marker": (add_setting("dark cyan", "bold"), "black"), + "breakpoint marker": (add_setting("dark red", "bold"), "black"), + # }}} + # {{{ sidebar + "sidebar two": ("light cyan", "black"), + "focused sidebar two": ("light cyan", "dark gray"), + "sidebar three": ("light magenta", "black"), + "focused sidebar three": ("light magenta", "dark gray"), + # }}} + # {{{ variables view + "return label": ("light green", "black"), + "focused return label": ("light green", "dark gray"), + # }}} + # {{{ stack + "current frame name": ("light green", "black"), + "focused current frame name": ("light green", "dark gray"), + # }}} + # {{{ shell + "command line prompt": (add_setting("yellow", "bold"), "black"), + "command line output": ("light cyan", "black"), + "command line error": ("yellow", "black"), + "focused command line output": ("light cyan", "dark gray"), + "focused command line error": (add_setting("yellow", "bold"), "dark gray"), + # }}} + # {{{ Code syntax + "literal": ("light magenta", "black"), + "builtin": ("light cyan", "black"), + "exception": ("light cyan", "black"), + "keyword2": ("light cyan", "black"), + "function": ("light green", "black"), + "class": (add_setting("light green", "underline"), "black"), + "keyword": ("light red", "black"), + "operator": ("light red", "black"), + "comment": ("dark gray", "black"), + "docstring": ("dark gray", "black"), + "argument": ("brown", "black"), + "pseudo": ("brown", "black"), + "string": ("yellow", "black"), + # }}} +} + +# vim: foldmethod=marker diff --git a/pudb/themes/monokai_256.py b/pudb/themes/monokai_256.py new file mode 100644 index 00000000..3dac7dbf --- /dev/null +++ b/pudb/themes/monokai_256.py @@ -0,0 +1,89 @@ +from pudb.themes.utils import add_setting, link + +# Give the colors some comprehensible names +black = "h236" +blacker = "h234" +dark_gray = "h240" +dark_green = "h28" +dark_red = "h124" +dark_teal = "h30" +dark_magenta = "h141" +light_blue = "h111" +light_cyan = "h51" +light_gray = "h252" +light_green = "h155" +light_red = "h160" +light_magenta = "h198" +medium_gray = "h243" +orange = "h208" +white = "h255" +yellow = "h228" + +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") + +palette_dict = { + # {{{ base styles + "background": (black, light_gray), + "selectable": (white, blacker), + "focused selectable": (white, dark_gray), + "highlighted": (white, dark_green), + "hotkey": (add_setting(black, "underline"), light_gray), + # }}} + # {{{ general ui + "input": (white, black), + "button": (add_setting(white, "bold"), black), + "focused button": (add_setting(white, "bold"), dark_gray), + "focused sidebar": (dark_teal, light_gray), + "warning": (add_setting(white, "bold"), dark_red), + "group head": (add_setting(black, "bold"), light_gray), + "dialog title": (add_setting(white, "bold"), blacker), + # }}} + # {{{ source view + "source": (white, black), + "current source": (add_setting(light_gray, "bold"), dark_teal), + "breakpoint source": (add_setting(white, "bold"), dark_red), + "line number": (dark_gray, black), + "current line marker": (add_setting(light_cyan, "bold"), black), + "breakpoint marker": (add_setting(light_red, "bold"), black), + # }}} + # {{{ sidebar + "sidebar two": (light_cyan, blacker), + "focused sidebar two": (light_cyan, dark_gray), + "sidebar three": (dark_magenta, blacker), + "focused sidebar three": (dark_magenta, dark_gray), + # }}} + # {{{ variables view + "highlighted var label": (light_gray, dark_green), + "return label": (light_green, blacker), + "focused return label": (light_green, dark_gray), + # }}} + # {{{ stack + "current frame name": (light_green, blacker), + "focused current frame name": (light_green, dark_gray), + # }}} + # {{{ shell + "command line prompt": (add_setting(yellow, "bold"), black), + "command line output": (light_cyan, black), + "command line error": (orange, black), + "focused command line output": (light_cyan, dark_gray), + "focused command line error": (add_setting(orange, "bold"), dark_gray), + # }}} + # {{{ Code syntax + "literal": (dark_magenta, black), + "builtin": (light_cyan, black), + "exception": (light_cyan, black), + "keyword2": (light_cyan, black), + "function": (light_green, black), + "class": (add_setting(light_green, "underline"), black), + "keyword": (light_magenta, black), + "operator": (light_magenta, black), + "comment": (medium_gray, black), + "docstring": (medium_gray, black), + "argument": (orange, black), + "pseudo": (orange, black), + "string": (yellow, black), + # }}} +} + +# vim: foldmethod=marker diff --git a/pudb/themes/solarized.py b/pudb/themes/solarized.py new file mode 100644 index 00000000..1b5e4406 --- /dev/null +++ b/pudb/themes/solarized.py @@ -0,0 +1,55 @@ +from pudb.themes.utils import add_setting, link + +palette_dict = { + # {{{ base styles + "background": ("light green", "light gray"), + "selectable": ("light green", "white"), + "focused selectable": ("white", "dark blue"), + "highlighted": ("white", "dark cyan"), + "hotkey": (add_setting("black", "underline"), "light gray"), + # }}} + # {{{ general ui + "dialog title": (add_setting("white", "bold"), "dark cyan"), + "warning": (add_setting("light red", "bold"), "white"), + "header warning": (add_setting("light red", "bold"), "light gray"), + "focused sidebar": ("dark red", "light gray"), + "group head": (add_setting("yellow", "bold"), "light gray"), + # }}} + # {{{ source view + "source": ("yellow", "white"), + "breakpoint source": ("light red", "light gray"), + "current source": ("light gray", "light blue"), + "line number": ("light blue", "white"), + "current line marker": (add_setting("light blue", "bold"), "white"), + "breakpoint marker": (add_setting("light red", "bold"), "white"), + # }}} + # {{{ sidebar + "sidebar two": ("dark blue", "white"), + "sidebar three": ("light cyan", "white"), + "focused sidebar three": ("light gray", "dark blue"), + # }}} + # {{{ variables view + "return label": ("white", "yellow"), + "focused return label": ("white", "yellow"), + # }}} + # {{{ stack + "current frame name": (add_setting("light green", "bold"), "white"), + "focused current frame name": (add_setting("white", "bold"), "dark blue"), + # }}} + # {{{ shell + "command line output": ("light green", "white"), + # }}} + # {{{ Code syntax + "namespace": ("dark red", "white"), + "exception": ("light red", "white"), + "keyword": ("brown", "white"), + "keyword2": ("dark magenta", "white"), + "function": ("dark green", "white"), + "literal": ("dark cyan", "white"), + "builtin": ("dark blue", "white"), + "comment": ("light cyan", "white"), + "pseudo": ("light cyan", "white"), + # }}} +} + +# vim: foldmethod=marker diff --git a/pudb/themes/utils.py b/pudb/themes/utils.py new file mode 100644 index 00000000..44f8aea7 --- /dev/null +++ b/pudb/themes/utils.py @@ -0,0 +1,21 @@ +import urwid + + +may_use_fancy_formats = not hasattr(urwid.escape, "_fg_attr_xterm") + + +def add_setting(color, setting): + if may_use_fancy_formats: + return f"{color}, {setting}" + return color + + +inheritance_overrides = {} + + +def link(child: str, parent: str): + inheritance_overrides[child] = parent + + +def reset_inheritance_overrides(): + inheritance_overrides.clear() diff --git a/pudb/themes/vim.py b/pudb/themes/vim.py new file mode 100644 index 00000000..f154d4a4 --- /dev/null +++ b/pudb/themes/vim.py @@ -0,0 +1,64 @@ +from pudb.themes.utils import add_setting, link + +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") + +palette_dict = { + # {{{ base styles + "background": ("black", "light gray"), + "selectable": ("black", "dark cyan"), + "focused selectable": ("black", "light cyan"), + "hotkey": (add_setting("black", "bold, underline"), "light gray"), + "highlighted": ("black", "yellow"), + # }}} + # {{{ general ui + "header": (add_setting("black", "bold"), "light gray"), + "group head": ("dark blue", "light gray"), + "dialog title": (add_setting("white", "bold"), "dark blue"), + "input": ("black", "dark cyan"), + "focused input": ("black", "light cyan"), + "warning": (add_setting("dark red", "bold"), "white"), + "header warning": (add_setting("dark red", "bold"), "light gray"), + # }}} + # {{{ source view + "source": ("black", "white"), + "current source": ("black", "dark cyan"), + "breakpoint source": ("dark red", "light gray"), + "line number": ("dark gray", "white"), + "current line marker": ("dark red", "white"), + "breakpoint marker": ("dark red", "white"), + # }}} + # {{{ sidebar + "sidebar one": ("black", "dark cyan"), + "sidebar two": ("dark blue", "dark cyan"), + "sidebar three": ("dark gray", "dark cyan"), + "focused sidebar one": ("black", "light cyan"), + "focused sidebar two": ("dark blue", "light cyan"), + "focused sidebar three": ("dark gray", "light cyan"), + # }}} + # {{{ variables view + "highlighted var label": ("dark blue", "yellow"), + "return label": ("white", "dark blue"), + "focused return label": ("light gray", "dark blue"), + # }}} + # {{{ stack + "current frame name": (add_setting("white", "bold"), "dark cyan"), + "focused current frame name": (add_setting("black", "bold"), "light cyan"), + # }}} + # {{{ shell + "command line output": ( + add_setting("dark gray", "bold"), "white"), + # }}} + # {{{ Code syntax + "keyword2": ("dark magenta", "white"), + "namespace": ("dark magenta", "white"), + "literal": ("dark red", "white"), + "exception": ("dark red", "white"), + "comment": ("dark gray", "white"), + "function": ("dark blue", "white"), + "pseudo": ("dark gray", "white"), + "builtin": ("light blue", "white"), + # }}} +} + +# vim: foldmethod=marker From 5293730bca36de7b4ca29cb22d6d15af78fae669 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 21:21:47 -0600 Subject: [PATCH 03/13] Add light gray 256 theme --- pudb/themes/__init__.py | 2 ++ pudb/themes/gray_light_256.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 pudb/themes/gray_light_256.py diff --git a/pudb/themes/__init__.py b/pudb/themes/__init__.py index cfcbe221..d38c449f 100644 --- a/pudb/themes/__init__.py +++ b/pudb/themes/__init__.py @@ -2,6 +2,7 @@ from .agr_256 import palette_dict as Agr256 from .solarized import palette_dict as Solarized from .dark_vim import palette_dict as DarkVim +from .gray_light_256 import palette_dict as GrayLight256 from .midnight import palette_dict as Midnight from .mono import palette_dict as Mono from .monokai import palette_dict as Monokai @@ -17,5 +18,6 @@ "solarized": Solarized, "mono": Mono, "agr-256": Agr256, + "gray-light-256": GrayLight256, "monokai-256": Monokai256, } diff --git a/pudb/themes/gray_light_256.py b/pudb/themes/gray_light_256.py new file mode 100644 index 00000000..862502ba --- /dev/null +++ b/pudb/themes/gray_light_256.py @@ -0,0 +1,33 @@ +from pudb.themes.utils import add_setting, link + +palette_dict = { + # {{{ base styles + "background": ("h232", "h248"), + "selectable": ("h232", "h252"), + "focused selectable": ("h232", "h251"), + "highlighted": (add_setting("h234", "bold, underline"), "h252"), + "hotkey": (add_setting("h232", "underline"), "h248"), + # }}} + # {{{ general ui + "warning": (add_setting("h232", "bold"), "h254"), + "group head": (add_setting("h232", "bold"), "h248"), + "dialog title": (add_setting("h232", "underline, bold"), "h248"), + # }}} + # {{{ source view + "source": ("h235", "h253"), + "current source": (add_setting("h232", "underline"), "h253"), + "line number": ("h244", "h253"), + # }}} + # {{{ sidebar + "sidebar two": (add_setting("h234", "bold"), "h252"), + "focused sidebar two": (add_setting("h234", "bold"), "h251"), + "sidebar three": ("h239", "h252"), + "focused sidebar three": ("h239", "h251"), + # }}} + # {{{ Code syntax + "exception": (add_setting("h236", "underline"), "h253"), + "class": (add_setting("h234", "bold, underline"), "h253"), + "keyword": (add_setting("h234", "bold"), "h253"), + "comment": ("h244", "h253"), + # }}} +} From 22c3ed855ab2979ce10e0a5d98d380d988f7cc24 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Mon, 18 Sep 2023 08:07:02 -0600 Subject: [PATCH 04/13] Use regular source background for warnings --- pudb/themes/gray_light_256.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pudb/themes/gray_light_256.py b/pudb/themes/gray_light_256.py index 862502ba..0d6ed704 100644 --- a/pudb/themes/gray_light_256.py +++ b/pudb/themes/gray_light_256.py @@ -9,7 +9,7 @@ "hotkey": (add_setting("h232", "underline"), "h248"), # }}} # {{{ general ui - "warning": (add_setting("h232", "bold"), "h254"), + "warning": (add_setting("h232", "bold"), "h253"), "group head": (add_setting("h232", "bold"), "h248"), "dialog title": (add_setting("h232", "underline, bold"), "h248"), # }}} From 4ee8139e75ed83c0652dca2d1f9e12ba9ebee87b Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Mon, 18 Sep 2023 08:10:46 -0600 Subject: [PATCH 05/13] Add a bold highlight to sidebar header when focused --- pudb/themes/gray_light_256.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pudb/themes/gray_light_256.py b/pudb/themes/gray_light_256.py index 0d6ed704..6aa3e10c 100644 --- a/pudb/themes/gray_light_256.py +++ b/pudb/themes/gray_light_256.py @@ -9,6 +9,7 @@ "hotkey": (add_setting("h232", "underline"), "h248"), # }}} # {{{ general ui + "focused sidebar": (add_setting("h232", "bold"), "h248"), "warning": (add_setting("h232", "bold"), "h253"), "group head": (add_setting("h232", "bold"), "h248"), "dialog title": (add_setting("h232", "underline, bold"), "h248"), From 65026d6030ea4382bd289fa895f42e078f3aa768 Mon Sep 17 00:00:00 2001 From: jgart Date: Wed, 16 Nov 2022 20:13:34 -0600 Subject: [PATCH 06/13] Add nord-256 theme --- pudb/themes/__init__.py | 2 + pudb/themes/nord_dark_256.py | 122 +++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 pudb/themes/nord_dark_256.py diff --git a/pudb/themes/__init__.py b/pudb/themes/__init__.py index d38c449f..00cb93b8 100644 --- a/pudb/themes/__init__.py +++ b/pudb/themes/__init__.py @@ -7,6 +7,7 @@ from .mono import palette_dict as Mono from .monokai import palette_dict as Monokai from .monokai_256 import palette_dict as Monokai256 +from .nord_dark_256 import palette_dict as NordDark256 from .vim import palette_dict as Vim THEMES = { @@ -20,4 +21,5 @@ "agr-256": Agr256, "gray-light-256": GrayLight256, "monokai-256": Monokai256, + "nord-dark-256": NordDark256, } diff --git a/pudb/themes/nord_dark_256.py b/pudb/themes/nord_dark_256.py new file mode 100644 index 00000000..16c3c87c --- /dev/null +++ b/pudb/themes/nord_dark_256.py @@ -0,0 +1,122 @@ +from pudb.themes.utils import add_setting, link + +# ------------------------------------------------------------------------------ +# Colors are approximations of https://www.nordtheme.com/docs/colors-and-palettes +# Polar Night is made up of four darker colors (nord 0, nord1, nord2, and nord3) +# that are commonly used for base elements like backgrounds or text color in +# bright ambiance designs. +# ------------------------------------------------------------------------------ + +# nord0 is the origin color or the Polar Night palette. +nord0 = "h236" + +# nord1 is a brighter shade color based on nord0. +nord1 = "h238" + +# nord2 is an even more brighter shade color of nord0. +nord2 = "h239" + +# nord3 is the brightest shade color based on nord0. +nord3 = "h240" + +# nord4 is the origin color or the Snow Storm palette. +nord4 = "h253" + +# nord5 is a brighter shade color of nord4. +nord5 = "h255" + +# nord6 is the brightest shade color based on nord4. +# We don't use nord 6 because it is not representable. +# nord6 = "h256" + + +# nord7 is a calm and highly contrasted color reminiscent of +# frozen polar water. +nord7 = "h109" + + +# nord8 is a bright and shiny primary accent color reminiscent of pure +# and clear ice. +nord8 = "h110" + + +# nord9 is a more darkened and less saturated color reminiscent of +# arctic waters. +nord9 = "h109" + +# nord10 is a dark and intensive color reminiscent of the deep arctic ocean. +nord10 = "h67" + +# nord11 is a reddish color. +nord11 = "h131" + +link("current breakpoint", "current frame name") +link("focused current breakpoint", "focused current frame name") +palette_dict = { + + # {{{ base styles + "background": (nord0, nord7), + "selectable": (nord4, nord1), + "focused selectable": (nord4, nord2), + "highlighted": (nord4, nord3), + "hotkey": (add_setting(nord0, "underline"), nord7), + # }}} + # {{{ general ui + "input": (nord4, nord0), + "button": (add_setting(nord4, "bold"), nord0), + "focused button": (add_setting(nord4, "bold"), nord2), + "focused sidebar": (nord0, nord11), + "warning": (add_setting(nord4, "bold"), nord4), + "group head": (add_setting(nord0, "bold"), nord1), + "dialog title": (add_setting(nord4, "bold"), nord1), + # }}} + # {{{ source view + "source": (nord4, nord0), + "current source": (nord11, nord0), + "breakpoint source": (nord4, nord0), + "line number": (nord2, nord0), + "current line marker": (add_setting(nord11, "bold"), nord0), + "breakpoint marker": (add_setting(nord11, "bold"), nord0), + # }}} + # {{{ sidebar + "sidebar two": (nord9, nord1), + "focused sidebar two": (nord0, nord2), + "sidebar three": (nord0, nord1), + "focused sidebar three": (nord5, nord2), + # }}} + # {{{ variables view + "highlighted var label": (nord8, nord9), + "return label": (nord9, nord8), + "focused return label": (nord9, nord8), + # }}} + # {{{ stack + "current frame name": (nord9, nord1), + "focused current frame name": (nord9, nord2), + # }}} + # {{{ shell + "command line prompt": ( + add_setting(nord5, "bold"), nord0), + "command line output": (nord7, nord0), + "command line error": (nord3, nord0), + "focused command line output": (nord7, nord2), + "focused command line error": ( + add_setting(nord3, "bold"), nord2), + # }}} + # {{{ Code syntax + "literal": (nord8, nord0), + "builtin": (nord8, nord0), + "exception": (nord8, nord0), + "keyword2": (nord9, nord0), + "function": (nord8, nord0), + "class": (add_setting(nord9, "underline"), nord0), + "keyword": (nord8, nord0), + "operator": (nord5, nord0), + "comment": (nord2, nord0), + "docstring": (nord2, nord0), + "argument": (nord11, nord0), + "pseudo": (nord5, nord0), + "string": (nord5, nord0), + # }}} +} + +# vim: foldmethod=marker From 67842f9975a2b7a9f99bcfac974cee3f65eb98b4 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sat, 16 Sep 2023 11:44:17 -0600 Subject: [PATCH 07/13] Trim whitespace --- pudb/themes/nord_dark_256.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pudb/themes/nord_dark_256.py b/pudb/themes/nord_dark_256.py index 16c3c87c..cbe5e69c 100644 --- a/pudb/themes/nord_dark_256.py +++ b/pudb/themes/nord_dark_256.py @@ -2,8 +2,8 @@ # ------------------------------------------------------------------------------ # Colors are approximations of https://www.nordtheme.com/docs/colors-and-palettes -# Polar Night is made up of four darker colors (nord 0, nord1, nord2, and nord3) -# that are commonly used for base elements like backgrounds or text color in +# Polar Night is made up of four darker colors (nord 0, nord1, nord2, and nord3) +# that are commonly used for base elements like backgrounds or text color in # bright ambiance designs. # ------------------------------------------------------------------------------ @@ -29,17 +29,14 @@ # We don't use nord 6 because it is not representable. # nord6 = "h256" - # nord7 is a calm and highly contrasted color reminiscent of # frozen polar water. nord7 = "h109" - # nord8 is a bright and shiny primary accent color reminiscent of pure # and clear ice. nord8 = "h110" - # nord9 is a more darkened and less saturated color reminiscent of # arctic waters. nord9 = "h109" From c26d9ae8ee1d94311bb67476b225806678d43a36 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 14:05:27 -0600 Subject: [PATCH 08/13] Define all 16 colours of the nord theme --- pudb/themes/nord_dark_256.py | 42 ++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/pudb/themes/nord_dark_256.py b/pudb/themes/nord_dark_256.py index cbe5e69c..e72b89f0 100644 --- a/pudb/themes/nord_dark_256.py +++ b/pudb/themes/nord_dark_256.py @@ -2,6 +2,9 @@ # ------------------------------------------------------------------------------ # Colors are approximations of https://www.nordtheme.com/docs/colors-and-palettes +# ------------------------------------------------------------------------------ + +# ------------------------------------------------------------------------------ # Polar Night is made up of four darker colors (nord 0, nord1, nord2, and nord3) # that are commonly used for base elements like backgrounds or text color in # bright ambiance designs. @@ -17,17 +20,27 @@ nord2 = "h239" # nord3 is the brightest shade color based on nord0. -nord3 = "h240" +nord3 = "h243" + +# ------------------------------------------------------------------------------ +# Snow Storm is made up of three bright colors that are commonly used for text +# colors or base UI elements in bright ambiance designs. +# ------------------------------------------------------------------------------ # nord4 is the origin color or the Snow Storm palette. nord4 = "h253" # nord5 is a brighter shade color of nord4. -nord5 = "h255" +nord5 = "h254" # nord6 is the brightest shade color based on nord4. -# We don't use nord 6 because it is not representable. -# nord6 = "h256" +nord6 = "h255" + +# ------------------------------------------------------------------------------ +# Frost can be described as the heart palette of Nord, a group of four bluish +# colors that are commonly used for primary UI component and text highlighting +# and essential code syntax elements. +# ------------------------------------------------------------------------------ # nord7 is a calm and highly contrasted color reminiscent of # frozen polar water. @@ -39,13 +52,30 @@ # nord9 is a more darkened and less saturated color reminiscent of # arctic waters. -nord9 = "h109" +nord9 = "h111" # nord10 is a dark and intensive color reminiscent of the deep arctic ocean. nord10 = "h67" +# ------------------------------------------------------------------------------ +# Aurora consists of five colorful components reminiscent of the "Aurora +# borealis", sometimes referred to as polar lights or northern lights. +# ------------------------------------------------------------------------------ + # nord11 is a reddish color. -nord11 = "h131" +nord11 = "h138" + +# nord12 is an orangey color. +nord12 = "h174" + +# nord13 is a yellowy color. +nord13 = "h216" + +# nord14 is a greenish color. +nord14 = "h150" + +# nord15 is a purplish color. +nord15 = "h139" link("current breakpoint", "current frame name") link("focused current breakpoint", "focused current frame name") From 8501ca0f09067e59c97966f7f69f5c1d785b2b57 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 14:14:42 -0600 Subject: [PATCH 09/13] Use light green for highlight --- pudb/themes/nord_dark_256.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pudb/themes/nord_dark_256.py b/pudb/themes/nord_dark_256.py index e72b89f0..a17ed084 100644 --- a/pudb/themes/nord_dark_256.py +++ b/pudb/themes/nord_dark_256.py @@ -85,7 +85,7 @@ "background": (nord0, nord7), "selectable": (nord4, nord1), "focused selectable": (nord4, nord2), - "highlighted": (nord4, nord3), + "highlighted": (nord14, nord1), "hotkey": (add_setting(nord0, "underline"), nord7), # }}} # {{{ general ui @@ -112,7 +112,9 @@ "focused sidebar three": (nord5, nord2), # }}} # {{{ variables view - "highlighted var label": (nord8, nord9), + "highlighted var label": (nord14, nord1), + "focused highlighted var label": (nord14, nord2), + "focused highlighted var value": (nord14, nord2), "return label": (nord9, nord8), "focused return label": (nord9, nord8), # }}} From 7ed46f2f85313c891d32cf5b5fd48844259d65e2 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 14:22:11 -0600 Subject: [PATCH 10/13] Use brighter warning / breakpoint highlights --- pudb/themes/nord_dark_256.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pudb/themes/nord_dark_256.py b/pudb/themes/nord_dark_256.py index a17ed084..97cfd5ec 100644 --- a/pudb/themes/nord_dark_256.py +++ b/pudb/themes/nord_dark_256.py @@ -93,14 +93,14 @@ "button": (add_setting(nord4, "bold"), nord0), "focused button": (add_setting(nord4, "bold"), nord2), "focused sidebar": (nord0, nord11), - "warning": (add_setting(nord4, "bold"), nord4), + "warning": (nord12, nord2), "group head": (add_setting(nord0, "bold"), nord1), "dialog title": (add_setting(nord4, "bold"), nord1), # }}} # {{{ source view "source": (nord4, nord0), "current source": (nord11, nord0), - "breakpoint source": (nord4, nord0), + "breakpoint source": (nord12, nord0), "line number": (nord2, nord0), "current line marker": (add_setting(nord11, "bold"), nord0), "breakpoint marker": (add_setting(nord11, "bold"), nord0), @@ -123,13 +123,11 @@ "focused current frame name": (nord9, nord2), # }}} # {{{ shell - "command line prompt": ( - add_setting(nord5, "bold"), nord0), + "command line prompt": (add_setting(nord5, "bold"), nord0), "command line output": (nord7, nord0), - "command line error": (nord3, nord0), + "command line error": (nord12, nord0), "focused command line output": (nord7, nord2), - "focused command line error": ( - add_setting(nord3, "bold"), nord2), + "focused command line error": (nord12, nord2), # }}} # {{{ Code syntax "literal": (nord8, nord0), From 923f975092ddf1ef8963525ca1ce775ecfc8fee9 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 14:25:36 -0600 Subject: [PATCH 11/13] Revise UI elements for legibility --- pudb/themes/nord_dark_256.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pudb/themes/nord_dark_256.py b/pudb/themes/nord_dark_256.py index 97cfd5ec..70b7fe46 100644 --- a/pudb/themes/nord_dark_256.py +++ b/pudb/themes/nord_dark_256.py @@ -92,35 +92,36 @@ "input": (nord4, nord0), "button": (add_setting(nord4, "bold"), nord0), "focused button": (add_setting(nord4, "bold"), nord2), - "focused sidebar": (nord0, nord11), + "focused sidebar": (nord0, nord7), "warning": (nord12, nord2), - "group head": (add_setting(nord0, "bold"), nord1), + "group head": (add_setting(nord0, "bold"), nord7), "dialog title": (add_setting(nord4, "bold"), nord1), # }}} # {{{ source view "source": (nord4, nord0), - "current source": (nord11, nord0), + "current source": (nord13, nord1), + "current focused source": (nord13, nord2), "breakpoint source": (nord12, nord0), "line number": (nord2, nord0), - "current line marker": (add_setting(nord11, "bold"), nord0), - "breakpoint marker": (add_setting(nord11, "bold"), nord0), + "current line marker": (add_setting(nord13, "bold"), nord0), + "breakpoint marker": (add_setting(nord13, "bold"), nord0), # }}} # {{{ sidebar - "sidebar two": (nord9, nord1), - "focused sidebar two": (nord0, nord2), - "sidebar three": (nord0, nord1), - "focused sidebar three": (nord5, nord2), + "sidebar two": (nord7, nord1), + "focused sidebar two": (nord7, nord2), + "sidebar three": (nord10, nord1), + "focused sidebar three": (nord10, nord2), # }}} # {{{ variables view "highlighted var label": (nord14, nord1), "focused highlighted var label": (nord14, nord2), "focused highlighted var value": (nord14, nord2), - "return label": (nord9, nord8), - "focused return label": (nord9, nord8), + "return label": (nord0, nord8), + "focused return label": (nord0, nord8), # }}} # {{{ stack - "current frame name": (nord9, nord1), - "focused current frame name": (nord9, nord2), + "current frame name": (nord14, nord1), + "focused current frame name": (nord14, nord2), # }}} # {{{ shell "command line prompt": (add_setting(nord5, "bold"), nord0), From eba4fde7e1f823dbda2bd1262543041dd4c23a93 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Sun, 17 Sep 2023 14:26:11 -0600 Subject: [PATCH 12/13] Try to bring syntax highlighting more in line with nord themes seen elsewhere --- pudb/themes/nord_dark_256.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pudb/themes/nord_dark_256.py b/pudb/themes/nord_dark_256.py index 70b7fe46..430b5391 100644 --- a/pudb/themes/nord_dark_256.py +++ b/pudb/themes/nord_dark_256.py @@ -131,19 +131,17 @@ "focused command line error": (nord12, nord2), # }}} # {{{ Code syntax - "literal": (nord8, nord0), - "builtin": (nord8, nord0), - "exception": (nord8, nord0), - "keyword2": (nord9, nord0), - "function": (nord8, nord0), + "literal": (nord15, nord0), + "builtin": (add_setting(nord7, "bold"), nord0), + "pseudo": (nord7, nord0), + "exception": (nord11, nord0), + "function": (nord7, nord0), "class": (add_setting(nord9, "underline"), nord0), "keyword": (nord8, nord0), - "operator": (nord5, nord0), - "comment": (nord2, nord0), - "docstring": (nord2, nord0), - "argument": (nord11, nord0), - "pseudo": (nord5, nord0), - "string": (nord5, nord0), + "keyword2": (nord9, nord0), + "operator": (nord8, nord0), + "comment": (nord3, nord0), + "string": (nord14, nord0), # }}} } From 21d1d16332b07a563df8798d0339e0ba56e8f00c Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Fri, 22 Sep 2023 10:47:38 -0600 Subject: [PATCH 13/13] Fix issues caught by flake8 --- pudb/theme.py | 13 +++++++---- pudb/themes/__init__.py | 44 +++++++++++++++++------------------ pudb/themes/gray_light_256.py | 2 +- pudb/themes/solarized.py | 2 +- 4 files changed, 33 insertions(+), 28 deletions(-) diff --git a/pudb/theme.py b/pudb/theme.py index 04bd207f..7bfa356c 100644 --- a/pudb/theme.py +++ b/pudb/theme.py @@ -23,13 +23,18 @@ THE SOFTWARE. """ -import urwid - -from dataclasses import dataclass, astuple, replace +from dataclasses import astuple, dataclass, replace from typing import Optional + from pudb.lowlevel import ui_log -from pudb.themes.utils import add_setting, link, inheritance_overrides, reset_inheritance_overrides from pudb.themes import THEMES +from pudb.themes.utils import ( + add_setting, + inheritance_overrides, + link, + reset_inheritance_overrides, +) + @dataclass class PaletteEntry: diff --git a/pudb/themes/__init__.py b/pudb/themes/__init__.py index 00cb93b8..eb462eb8 100644 --- a/pudb/themes/__init__.py +++ b/pudb/themes/__init__.py @@ -1,25 +1,25 @@ -from .classic import palette_dict as Classic -from .agr_256 import palette_dict as Agr256 -from .solarized import palette_dict as Solarized -from .dark_vim import palette_dict as DarkVim -from .gray_light_256 import palette_dict as GrayLight256 -from .midnight import palette_dict as Midnight -from .mono import palette_dict as Mono -from .monokai import palette_dict as Monokai -from .monokai_256 import palette_dict as Monokai256 -from .nord_dark_256 import palette_dict as NordDark256 -from .vim import palette_dict as Vim +from .classic import palette_dict as classic +from .agr_256 import palette_dict as agr256 +from .solarized import palette_dict as solarized +from .dark_vim import palette_dict as darkvim +from .gray_light_256 import palette_dict as graylight256 +from .midnight import palette_dict as midnight +from .mono import palette_dict as mono +from .monokai import palette_dict as monokai +from .monokai_256 import palette_dict as monokai256 +from .nord_dark_256 import palette_dict as norddark256 +from .vim import palette_dict as vim THEMES = { - "classic": Classic, - "vim": Vim, - "dark vim": DarkVim, - "midnight": Midnight, - "monokai": Monokai, - "solarized": Solarized, - "mono": Mono, - "agr-256": Agr256, - "gray-light-256": GrayLight256, - "monokai-256": Monokai256, - "nord-dark-256": NordDark256, + "classic": classic, + "vim": vim, + "dark vim": darkvim, + "midnight": midnight, + "monokai": monokai, + "solarized": solarized, + "mono": mono, + "agr-256": agr256, + "gray-light-256": graylight256, + "monokai-256": monokai256, + "nord-dark-256": norddark256, } diff --git a/pudb/themes/gray_light_256.py b/pudb/themes/gray_light_256.py index 6aa3e10c..13f4468c 100644 --- a/pudb/themes/gray_light_256.py +++ b/pudb/themes/gray_light_256.py @@ -1,4 +1,4 @@ -from pudb.themes.utils import add_setting, link +from pudb.themes.utils import add_setting palette_dict = { # {{{ base styles diff --git a/pudb/themes/solarized.py b/pudb/themes/solarized.py index 1b5e4406..1e6aa8f6 100644 --- a/pudb/themes/solarized.py +++ b/pudb/themes/solarized.py @@ -1,4 +1,4 @@ -from pudb.themes.utils import add_setting, link +from pudb.themes.utils import add_setting palette_dict = { # {{{ base styles