Compare commits

...

2 commits

Author SHA1 Message Date
Michael 4b66ad3583 Merge branch 'main' of https://git.booser.tech/mbooser/ShitScript 2025-08-11 00:47:25 -04:00
Michael c0f44582a5 Fixed Looping 2025-08-11 00:42:35 -04:00

View file

@ -11,7 +11,7 @@ pkgs.mkShell {
]; ];
shellHook = '' shellHook = ''
STIME=5 STIME=60
programs="cmatrix cbonsai nyancat fortuneCow" programs="cmatrix cbonsai nyancat fortuneCow"
trap 'stty sane; tput cnorm; clear' EXIT trap 'stty sane; tput cnorm; clear' EXIT
@ -22,8 +22,10 @@ pkgs.mkShell {
tput sgr0 tput sgr0
case "$choice" in case "$choice" in
cbonsai) cbonsai)
cbonsai -t .2 cbonsai -l -t 1 & pid=$!
sleep "$STIME" ( sleep "$STIME" && kill $pid ) & watcher=$!
wait $pid 2>/dev/null
kill $watcher 2>/dev/null || true
;; ;;
cmatrix) cmatrix)
bash -c "cmatrix -u 4 & pid=\$!; sleep $STIME; kill -INT \$pid; wait \$pid" bash -c "cmatrix -u 4 & pid=\$!; sleep $STIME; kill -INT \$pid; wait \$pid"