diff --git a/mod/newmail b/mod/newmail index bc8fc50..971f7ba 100644 --- a/mod/newmail +++ b/mod/newmail @@ -4,9 +4,9 @@ class NewMail < Worker def mainloop() while true do if unread_mail? - self.write "%{F#{@my_config['ok_colour']}}#{@my_config['ok_message']}%{F-}" - else self.write "%{F#{@my_config['crit_colour']}}#{@my_config['crit_message']}%{F-}" + else + self.write "%{F#{@my_config['ok_colour']}}#{@my_config['ok_message']}%{F-}" end sleep(3) @@ -15,7 +15,7 @@ class NewMail < Worker def unread_mail? @my_config['maildirs'].each do |dir| - if (Dir.entries(dir + "/new") - [ '.', '..' ]).empty? + if not (Dir.entries(dir + "/new") - [ '.', '..' ]).empty? return true end end