From 4d63628e470c3950dc81995e26359de3999c272c Mon Sep 17 00:00:00 2001 From: haliphax Date: Thu, 12 Oct 2023 12:06:17 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20userland=20script=20css=20puffer?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- userland/scripts/oneliners.py | 20 ++++++++++++-------- userland/scripts/top.py | 6 ++++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/userland/scripts/oneliners.py b/userland/scripts/oneliners.py index 53cc721..6dbb054 100644 --- a/userland/scripts/oneliners.py +++ b/userland/scripts/oneliners.py @@ -30,28 +30,28 @@ class OnlinersApp(XthuluApp): """Oneliners Textual app""" CSS = """ + $accent: ansi_red; + $error: ansi_bright_red; + Label { width: 100%; } ListItem { - background: grey; - color: black; + background: $primary-background; } ListItem.even { - background: black; - color: grey; + background: $secondary-background; } ListItem.--highlight { - background: red; - color: white; + background: $accent; } #err { - background: red; - color: white; + background: $error; + color: black; } """ """Stylesheet""" @@ -111,6 +111,10 @@ def compose(self): ], initial_index=len(self.oneliners) - 1, ) + list.styles.scrollbar_background = "black" + list.styles.scrollbar_color = "ansi_yellow" + list.styles.scrollbar_color_active = "white" + list.styles.scrollbar_color_hover = "ansi_bright_yellow" list.scroll_end(animate=False) yield list diff --git a/userland/scripts/top.py b/userland/scripts/top.py index bdbc46e..871f709 100644 --- a/userland/scripts/top.py +++ b/userland/scripts/top.py @@ -40,9 +40,11 @@ async def main(cx: SSHContext): ] ) + waiting = True + for _ in track(sequence=range(20), description=bar_text, console=cx.term): - if await cx.inkey(timeout=0.1): - break + if waiting and await cx.inkey(timeout=0.1): + waiting = False await cx.gosub("oneliners") await cx.gosub("lock_example")