don't get me fired please
This commit is contained in:
parent
4b66ad3583
commit
7045e10ad2
13
shell.nix
13
shell.nix
|
|
@ -11,15 +11,22 @@ pkgs.mkShell {
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
LAST=""
|
||||||
STIME=60
|
STIME=60
|
||||||
programs="cmatrix cbonsai nyancat fortuneCow"
|
programs="cmatrix cbonsai nyancat fortuneCow otherCow"
|
||||||
|
|
||||||
trap 'stty sane; tput cnorm; clear' EXIT
|
trap 'stty sane; tput cnorm; clear' EXIT
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
while :; do
|
||||||
choice=$(echo "$programs" | tr ' ' '\n' | shuf -n 1)
|
choice=$(echo "$programs" | tr ' ' '\n' | shuf -n 1)
|
||||||
|
[ "$choice" != "$LAST" ] && break
|
||||||
|
done
|
||||||
|
LAST="$choice"
|
||||||
|
|
||||||
clear
|
clear
|
||||||
tput sgr0
|
tput sgr0
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
cbonsai)
|
cbonsai)
|
||||||
cbonsai -l -t 1 & pid=$!
|
cbonsai -l -t 1 & pid=$!
|
||||||
|
|
@ -37,6 +44,10 @@ pkgs.mkShell {
|
||||||
fortune | cowsay
|
fortune | cowsay
|
||||||
sleep "$STIME"
|
sleep "$STIME"
|
||||||
;;
|
;;
|
||||||
|
otherCow)
|
||||||
|
fortune | cowsay --random
|
||||||
|
sleep "$STIME"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue