From 7045e10ad24c06322f32c7a6b5c41386e0fe6a86 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 11 Aug 2025 01:12:06 -0400 Subject: [PATCH] don't get me fired please --- shell.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index 040e198..7d54288 100644 --- a/shell.nix +++ b/shell.nix @@ -11,15 +11,22 @@ pkgs.mkShell { ]; shellHook = '' + LAST="" STIME=60 - programs="cmatrix cbonsai nyancat fortuneCow" + programs="cmatrix cbonsai nyancat fortuneCow otherCow" trap 'stty sane; tput cnorm; clear' EXIT while true; do - choice=$(echo "$programs" | tr ' ' '\n' | shuf -n 1) + while :; do + choice=$(echo "$programs" | tr ' ' '\n' | shuf -n 1) + [ "$choice" != "$LAST" ] && break + done + LAST="$choice" + clear - tput sgr0 + tput sgr0 + case "$choice" in cbonsai) cbonsai -l -t 1 & pid=$! @@ -37,6 +44,10 @@ pkgs.mkShell { fortune | cowsay sleep "$STIME" ;; + otherCow) + fortune | cowsay --random + sleep "$STIME" + ;; esac sleep 1 done