diff options
Diffstat (limited to 'email-widget/email.lua')
-rw-r--r-- | email-widget/email.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/email-widget/email.lua b/email-widget/email.lua index 10027d1..d6619f9 100644 --- a/email-widget/email.lua +++ b/email-widget/email.lua @@ -14,7 +14,7 @@ email_icon:set_image(path_to_icons .. "/mail-mark-new.png") watch( "python /home/<username>/.config/awesome/email-widget/count_unread_emails.py", 20, function(widget, stdout, stderr, exitreason, exitcode) - local unread_emails_num = tonumber(stdout) + local unread_emails_num = tonumber(stdout) or 0 if (unread_emails_num > 0) then email_icon:set_image(path_to_icons .. "/mail-mark-unread.png") email_widget:set_text(stdout) @@ -39,4 +39,4 @@ function show_emails() ) end -email_icon:connect_signal("mouse::enter", function() show_emails() end)
\ No newline at end of file +email_icon:connect_signal("mouse::enter", function() show_emails() end) |