Skip to content

Commit

Permalink
💄 userland script css puffery
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Oct 12, 2023
1 parent c44fb72 commit 4d63628
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
20 changes: 12 additions & 8 deletions userland/scripts/oneliners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions userland/scripts/top.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 4d63628

Please sign in to comment.