46 lines
708 B
Nix
46 lines
708 B
Nix
{pkgs ? import <nixpkgs> {} }:
|
|
|
|
pkgs.mkShell {
|
|
buildInputs = [
|
|
pkgs.cbonsai
|
|
pkgs.cmatrix
|
|
pkgs.neo-cowsay
|
|
pkgs.fortune
|
|
pkgs.nyancat
|
|
pkgs.coreutils
|
|
];
|
|
|
|
shellHook = ''
|
|
STIME=5
|
|
programs=("cbonsai" "cmatrix" "nyancat" "fortuneCow")
|
|
|
|
while true; do
|
|
choice=$(shuf -n 1 -e "cbonsai" "cmatrix" "nyancat" "fortuneCow")
|
|
clear
|
|
tput sgr0
|
|
case "$choice" in
|
|
cbonsai)
|
|
timeout "$STIME" cbonsai -t .2 -l
|
|
reset
|
|
clear
|
|
;;
|
|
cmatrix)
|
|
timeout "$STIME" cmatrix
|
|
reset
|
|
clear
|
|
;;
|
|
nyancat)
|
|
timeout "$STIME" nyancat
|
|
reset
|
|
clear
|
|
;;
|
|
fortuneCow)
|
|
fortune | cowsay
|
|
sleep "$STIME"
|
|
clear
|
|
;;
|
|
esac
|
|
done
|
|
'';
|
|
}
|