From 99ac0a904a58c1c074eb8df12ad380f1eaa442c6 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Mon, 21 Feb 2022 11:46:55 +0100 Subject: [PATCH] Fix status script --- home-manager/roles/gnome.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/home-manager/roles/gnome.nix b/home-manager/roles/gnome.nix index 6d8322d5..aabd0cb2 100644 --- a/home-manager/roles/gnome.nix +++ b/home-manager/roles/gnome.nix @@ -34,13 +34,18 @@ let dirs <- listDirectory "/home/maralorn/git" dirty <- fmap toText <$> filterM (isDirty . ("/home/maralorn/git/"<>)) dirs unpushed <- fmap toText <$> filterM (isUnpushed . ("/home/maralorn/git/"<>)) dirs - say . Text.unwords $ - ["", [i|#{appointments}|],playing, [i|#{show mode}|]] ++ + say . Text.unwords $ [ + "", + [i|#{appointments}|], + playing, + [i|#{show mode}|] + ] ++ memptyIfFalse ((unread /= "0") && mode >= Orga) (one [i|Unread: #{unread}|]) ++ memptyIfFalse ((inbox /= "0") && mode == Leisure) (one [i|Inbox: #{inbox}|]) ++ memptyIfFalse ((codeMails /= "0") && mode == Code) (one [i|Code: #{codeMails}|]) ++ memptyIfFalse (length unpushed /= 0) (one [i|Unpushed: #{Text.intercalate " " unpushed}|]) ++ - memptyIfFalse (length dirty /= 0) (one [i|Dirty: #{Text.intercalate " " dirty}|]) ++ [""] + memptyIfFalse (length dirty /= 0) (one [i|Dirty: #{Text.intercalate " " dirty}|]) ++ + [""] ''; in {