From b8b63ef974d07858a415490cdb060c821a3871f7 Mon Sep 17 00:00:00 2001 From: maralorn Date: Sun, 12 Mar 2023 13:25:03 +0100 Subject: [PATCH] Nicer notifications display --- packages/status-script/exe/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/status-script/exe/Main.hs b/packages/status-script/exe/Main.hs index 8e4f953c..f548e05a 100644 --- a/packages/status-script/exe/Main.hs +++ b/packages/status-script/exe/Main.hs @@ -262,7 +262,7 @@ main = do , simpleModule (1 * oneSecond) do now <- Time.getCurrentTime notifications <- lines . decodeUtf8 . ByteString.strip . fromRight "" <$> Exception.try @Exception.IOException (readFileBS [i|/home/maralorn/.notifications/#{Time.formatTime Time.defaultTimeLocale "%Y-%m-%d" now}.log|]) - when' (not $ null notifications) $ withColor red $ Text.strip $ Text.intercalate [i|\n$color1$hr${color \##{red}}\n|] $ fmap (unwords . drop 3 . Text.splitOn "|") notifications + when' (not $ null notifications) $ withColor red $ Text.strip $ Text.intercalate [i|\n$color1$hr${color \##{red}}\n|] $ fmap (Text.intercalate ":${color0} " . drop 3 . Text.splitOn "|") notifications ] foldConcurrently_ [ void $ simpleModule oneSecond (getMode home) mode_var