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"