diff options
| author | rixx <rixx-git@cutebit.de> | 2015-03-17 22:34:00 +0100 |
|---|---|---|
| committer | rixx <rixx-git@cutebit.de> | 2015-03-17 22:34:00 +0100 |
| commit | 2d021f0daf724bc165ec903daa0c456048497a79 (patch) | |
| tree | 977f9d5008f416347c51596042736921ec1aafdc /py3status/modules | |
| parent | 374fd321e29a40f8e00a7d4604f10c88495279fe (diff) | |
format string instead of strange string replace
Diffstat (limited to 'py3status/modules')
| -rw-r--r-- | py3status/modules/imap.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py3status/modules/imap.py b/py3status/modules/imap.py index 9b5aa5d..63e8665 100644 --- a/py3status/modules/imap.py +++ b/py3status/modules/imap.py @@ -19,7 +19,7 @@ class Py3status: hide_if_zero = False imap_server = '<IMAP_SERVER>' mailbox = 'INBOX' - name = 'Mail: %unseen' + name = 'Mail: {unseen}' new_mail_color = '' password = '<PASSWORD>' port = '993' @@ -40,7 +40,7 @@ class Py3status: response['full_text'] = mail_count elif mail_count != 0: response['color'] = self.new_mail_color - response['full_text'] = self.name.replace('%unseen', str(mail_count)) + response['full_text'] = self.name.format(unseen=mail_count) else: response['color'] = '' if self.hide_if_zero: |
