Skip to content

Commit 0e9173c

Browse files
committed
Colorize refresh rate and min duration
These are user inputs, similar to the duration mode, so let's colorize them as such.
1 parent f2c046b commit 0e9173c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: pgactivity/views.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,14 @@ def indent(text: str) -> str:
226226
pg_version,
227227
f"{term.bold}{host.hostname}{term.normal}",
228228
f"{term.cyan}{pg_host}{term.normal}",
229-
f"Ref.: {ui.refresh_time}s",
229+
f"Ref.: {term.yellow}{ui.refresh_time}s{term.normal}",
230230
f"Duration mode: {term.yellow}{ui.duration_mode.name}{term.normal}",
231231
]
232-
+ ([f"Min. duration: {ui.min_duration}s"] if ui.min_duration else [])
232+
+ (
233+
[f"Min. duration: {term.yellow}{ui.min_duration}s{term.normal}"]
234+
if ui.min_duration
235+
else []
236+
)
233237
)
234238
)
235239

0 commit comments

Comments
 (0)