summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrixx <rixx-git@cutebit.de>2015-03-15 00:54:24 +0100
committerrixx <rixx-git@cutebit.de>2015-03-15 00:54:46 +0100
commit00e4ef6b7be7f62521caca09defe44cd72e3cab2 (patch)
tree569ab5093238f6df6b0333badb99a0912857cdea
parent930469fcb4c0693a9a0572e7cb4a9914823442ba (diff)
imap only shows name if there are unread emails
-rw-r--r--py3status/modules/imap.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/py3status/modules/imap.py b/py3status/modules/imap.py
index d7ce5be..017bb3b 100644
--- a/py3status/modules/imap.py
+++ b/py3status/modules/imap.py
@@ -26,17 +26,21 @@ class Py3status:
mail_count = self._get_mail_count()
response = {
- 'cached_until': time() + self.cache_timeout,
- 'full_text': '{}: {}'.format(self.name, mail_count)
+ 'cached_until': time() + self.cache_timeout
}
- new_mail_color = i3s_config['color_good']
- check_failed_color = i3s_config['color_bad']
+ new_mail_color = i3s_config['color_bad']
+ response['full_text'] = 'blaa'
if mail_count == 'N/A':
- response['color'] = check_failed_color
+ response['color'] = ''
+ response['full_text'] = mail_count
elif mail_count != 0:
response['color'] = new_mail_color
+ response['full_text'] = self.name
+ else:
+ response['color'] = new_mail_color
+ response['full_text'] = ''
return response