Compare commits
2 commits
11b0a1d015
...
4b66ad3583
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b66ad3583 | ||
|
|
c0f44582a5 |
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue