Skip to content

Commit

Permalink
✨ add sysinfo to top demo
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Oct 12, 2023
1 parent c87c531 commit 449340e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
15 changes: 15 additions & 0 deletions userland/artwork/sysinfo.ans
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
 .
 .' `.
. . . . . . . . . . . . _ _____  .' .'. `. _____ _ . . . . . . . . . . . .
: ... ____ _////_ ___ ' .'.:.`. `.\__ _\\\\_ _... :
| : / _/___________ - �.// _/____ ___ _______ \.� - ________________ : |
'____\__�  /\/_________\__� /<___>\/_________\ _/\\____
 \ � Y \/  V /\ � Y : \  .  / : V/\ � Y_____\/_ /
'/. ______\_____  \/______\:::/_____\\/_/ ..�\___ V  . \
/_____/ .....�.... \\____/ . . .�:i:�. . .�\______\____/ .::::... \______/
� . ...%!!:!:!::::: >____/ . . | : | ili | : |  . . .�.....::::!:!:!!.... . .
| : |#%%!!!:!:!:!::.�... .'.. ' | : | lIl | : | ` ..`. ...:.::!:!:!:!!!%%#| : |
| | |##%!!!!:!!:::.:':'.. .. %| | | $$$ | | |% .. ..`:`:.:::!!:!!!!%##| | |
| ' �]-------------------------[� ' |-----| ` �]-------------------------[� ` |
+====' ....................... `====+ ... +====' ....................... `====+

13 changes: 5 additions & 8 deletions userland/scripts/top.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ async def main(cx: SSHContext):
return

await scroll_art(cx, "userland/artwork/login.ans", "amiga")
await cx.inkey()
return
await cx.inkey(
"You have to quit vim to proceed. Press a key when you're ready.",
"dots8Bit",
)
await cx.redirect(["/usr/bin/vi", "-R", "/app/xthulu/ssh/server.py"])
await cx.inkey("Press any key to continue", "arc")
await cx.inkey("Press any key to continue", "dots8Bit")

await scroll_art(cx, "userland/artwork/sysinfo.ans", "amiga")
cx.echo(
":skull: [bold bright_green]x[/][green]thulu[/] ",
"terminal server [italic]v1.0.0a0[/]\n",
"[bright_black]https://github.com/haliphax/xthulu[/]\n\n",
)
await cx.redirect(["/bin/ash", "-c", "uname -a; echo -e '\\r'; sleep 0.1"])
await cx.inkey("Press any key to continue", "arc")

bar_text = "".join(
[
Expand Down
4 changes: 0 additions & 4 deletions xthulu/ssh/console/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ async def _worker(self):

if self.context.inkey(timeout=0.1):
break
else:
await self.context.inkey(timeout=1)

self.exit()

Expand Down Expand Up @@ -124,8 +122,6 @@ async def scroll_art(

if await context.inkey(timeout=delay):
break
else:
await context.inkey(timeout=1)


async def show_art(context: SSHContext, path: str, encoding="cp437"):
Expand Down

0 comments on commit 449340e

Please sign in to comment.