summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-01-11 20:49:46 +0100
committertv <tv@shackspace.de>2015-01-11 20:49:46 +0100
commitdf057aa8493de81770576c596fe6a497605481ea (patch)
tree5f1fc9f4245edd89a625aef77030883877682211
parentf64f203cd90137d4891c62c7817216e5f185f1fa (diff)
change color of read messages
-rw-r--r--RenderTreeView.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/RenderTreeView.hs b/RenderTreeView.hs
index 155cf52..288764f 100644
--- a/RenderTreeView.hs
+++ b/RenderTreeView.hs
@@ -125,6 +125,7 @@ tagsSGR = SGR [38,5,036]
killedTagSGR = SGR [38,5,088]
starTagSGR = SGR [38,5,226]
+boringMessageSGR = SGR [38,5,023]
unreadMessageSGR = SGR [38,5,117]
unreadSearchSGR = SGR [38,5,250]
@@ -147,14 +148,15 @@ renderTreeView1 now hasFocus x = case x of
in c $ subj <> " " <> date <> " " <> tags
TVMessage m ->
- let c = if hasFocus then focusSGR else
+ let fromSGR =
+ if hasFocus then focusSGR else
if "unread" `elem` Notmuch.messageTags m
then unreadMessageSGR
- else boringSGR
- from = renderFrom (M.lookup "from" $ Notmuch.messageHeaders m)
+ else boringMessageSGR
+ from = fromSGR $ renderFrom (M.lookup "from" $ Notmuch.messageHeaders m)
date = dateSGR $ renderDate now x
tags = tagsSGR $ renderTags (Notmuch.messageTags m) -- TODO filter common tags
- in c $ from <> " " <> date <> " " <> tags
+ in from <> " " <> date <> " " <> tags
TVMessageHeaderField m fieldName ->
let c = if hasFocus then focusSGR else boringSGR