diff --git a/pgactivity/ui.py b/pgactivity/ui.py index 0e7e822a..c34fef90 100644 --- a/pgactivity/ui.py +++ b/pgactivity/ui.py @@ -97,7 +97,7 @@ def main( keys.PROCESS_CANCEL: ("cancel", "yellow"), keys.PROCESS_KILL: ("terminate", "red"), }[key] - action_formatter = term.formatter(color) + action_formatter = getattr(term, color) pids = pg_procs.selected if len(pids) > 1: ptitle = f"processes {', '.join((str(p) for p in pids))}" diff --git a/pgactivity/widgets.py b/pgactivity/widgets.py index 219ea3ab..586bd394 100644 --- a/pgactivity/widgets.py +++ b/pgactivity/widgets.py @@ -12,7 +12,7 @@ def boxed( width: Optional[int] = None, ) -> str: border_width = term.length(content) + 2 - border_formatter = term.formatter(border_color) + border_formatter = getattr(term, border_color) lines = [ border_formatter("┌" + "─" * border_width + "┐"), " ".join([border_formatter("│") + term.normal, content, border_formatter("│")]),