From c0f44582a5fc00722c9e384afe4bab784e478b72 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 11 Aug 2025 00:42:35 -0400 Subject: [PATCH] Fixed Looping --- shell.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index 36919d2..040e198 100644 --- a/shell.nix +++ b/shell.nix @@ -11,7 +11,7 @@ pkgs.mkShell { ]; shellHook = '' - STIME=5 + STIME=60 programs="cmatrix cbonsai nyancat fortuneCow" trap 'stty sane; tput cnorm; clear' EXIT @@ -22,8 +22,10 @@ pkgs.mkShell { tput sgr0 case "$choice" in cbonsai) - cbonsai -t .2 - sleep "$STIME" + cbonsai -l -t 1 & pid=$! + ( sleep "$STIME" && kill $pid ) & watcher=$! + wait $pid 2>/dev/null + kill $watcher 2>/dev/null || true ;; cmatrix) bash -c "cmatrix -u 4 & pid=\$!; sleep $STIME; kill -INT \$pid; wait \$pid"