From b39da5b24d52751a702bb198c5fbe54c0e7d4c23 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sat, 7 Jan 2023 13:49:21 -0800 Subject: [PATCH] Don't display fortune over 128 characters --- hosts/home.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hosts/home.nix b/hosts/home.nix index b207762..68785a6 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -100,6 +100,15 @@ in # 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"; }; - bashrcExtra = "pfetch\nfortune"; + bashrcExtra = '' + pfetch + while true; do + f=`fortune` + if [ ''${#f} -lt 128 ]; then + echo "''${f}" + break + fi + done + ''; }; }