Don't display fortune over 128 characters

This commit is contained in:
Elnu 2023-01-07 13:49:21 -08:00
parent 5ce8aa8641
commit b39da5b24d

View file

@ -100,6 +100,15 @@ in
# config.allowUnfree seems to not apply to nix-env, so is provided explicitly # config.allowUnfree seems to not apply to nix-env, so is provided explicitly
latest = "NIXPKGS_ALLOW_UNFREE=1 nix-env -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz -iA"; latest = "NIXPKGS_ALLOW_UNFREE=1 nix-env -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz -iA";
}; };
bashrcExtra = "pfetch\nfortune"; bashrcExtra = ''
pfetch
while true; do
f=`fortune`
if [ ''${#f} -lt 128 ]; then
echo "''${f}"
break
fi
done
'';
}; };
} }