From f3e565631c7cf16b9e6b85d06b71068494322961 Mon Sep 17 00:00:00 2001 From: maralorn Date: Mon, 2 Jan 2023 11:21:45 +0100 Subject: [PATCH] Update status bar colors to catppuccin-latte --- home-manager/roles/status-script.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/home-manager/roles/status-script.hs b/home-manager/roles/status-script.hs index 621b69bd..66b34410 100644 --- a/home-manager/roles/status-script.hs +++ b/home-manager/roles/status-script.hs @@ -101,7 +101,7 @@ main = do pure $ if null appointments then Nothing - else Just [i|#{Text.intercalate "; " appointments}|] + else Just [i|#{Text.intercalate "; " appointments}|] , simpleModule oneSecond $ Just . Text.replace "Stopped -" "⏹" . Text.replace "Playing -" "▶" . Text.replace "Paused -" "⏸" . Text.intercalate " - " . fmap decodeUtf8 . filter (/= "") <$> mapM tryCmd [playerctl "status", playerctl "metadata" "title", playerctl "metadata" "album", playerctl "metadata" "artist"] , simpleModule oneSecond $ do @@ -110,40 +110,40 @@ main = do if mode >= Orga then notmuch "count" "folder:hera/Inbox" "tag:unread" |> captureTrim else pure "0" - pure $ memptyIfFalse (unread /= "0") (Just [i|Unread: #{unread}|]) + pure $ memptyIfFalse (unread /= "0") (Just [i|Unread: #{unread}|]) , simpleModule oneSecond $ do mode <- read_mode inbox <- if mode == Leisure then notmuch "count" "folder:hera/Inbox" |> captureTrim else pure "0" - pure $ memptyIfFalse (inbox /= "0") (Just [i|Inbox: #{inbox}|]) + pure $ memptyIfFalse (inbox /= "0") (Just [i|Inbox: #{inbox}|]) , simpleModule oneSecond $ do mode <- read_mode codeMails <- if mode == Code then notmuch "count" "folder:hera/Code" |> captureTrim else pure "0" - pure $ memptyIfFalse (codeMails /= "0") (Just [i|Code Mails: #{codeMails}|]) + pure $ memptyIfFalse (codeMails /= "0") (Just [i|Code Mails: #{codeMails}|]) , simpleModule (5 * oneSecond) $ do mode <- read_mode codeUpdates <- if mode == Code then fromMaybe 0 . readMaybe . toString . Text.replace " unread articles" "" . decodeUtf8 <$> tryCmd (exe "software-updates" "-x" "print-unread") else pure 0 - pure $ memptyIfFalse (codeUpdates /= 0) (Just [i|Code Updates: #{codeUpdates}|]) + pure $ memptyIfFalse (codeUpdates /= 0) (Just [i|Code Updates: #{codeUpdates}|]) , simpleModule (5 * oneSecond) $ do dirs <- listDirectory "/home/maralorn/git" dirty <- fmap toText <$> filterM (isDirty . ("/home/maralorn/git/" <>)) dirs - pure $ memptyIfFalse (not (null dirty)) (Just [i|Dirty: #{Text.intercalate " " dirty}|]) + pure $ memptyIfFalse (not (null dirty)) (Just [i|Dirty: #{Text.intercalate " " dirty}|]) , simpleModule (5 * oneSecond) $ do dirs <- listDirectory "/home/maralorn/git" unpushed <- fmap toText <$> filterM (isUnpushed . ("/home/maralorn/git/" <>)) dirs - pure $ memptyIfFalse (not (null unpushed)) (Just [i|Unpushed: #{Text.intercalate " " unpushed}|]) + pure $ memptyIfFalse (not (null unpushed)) (Just [i|Unpushed: #{Text.intercalate " " unpushed}|]) , simpleModule 1 $ do atomically $ takeTMVar (update mode_var) mode <- read_mode - pure $ Just [i|#{show mode}|] + pure $ Just [i|#{show mode}|] ] foldConcurrently_ [ void $ simpleModule oneSecond getMode mode_var