From ed2b256407291d8edadfcea9380029633cc7d9d8 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sun, 6 Dec 2020 14:47:40 -0500 Subject: fix more warnings --- email-widget/email.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'email-widget') diff --git a/email-widget/email.lua b/email-widget/email.lua index d6619f9..f7656fb 100644 --- a/email-widget/email.lua +++ b/email-widget/email.lua @@ -5,30 +5,30 @@ local watch = require("awful.widget.watch") local path_to_icons = "/usr/share/icons/Arc/actions/22/" -email_widget = wibox.widget.textbox() +local email_widget = wibox.widget.textbox() email_widget:set_font('Play 9') -email_icon = wibox.widget.imagebox() +local email_icon = wibox.widget.imagebox() email_icon:set_image(path_to_icons .. "/mail-mark-new.png") watch( "python /home//.config/awesome/email-widget/count_unread_emails.py", 20, - function(widget, stdout, stderr, exitreason, exitcode) + function(_, 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_icon:set_image(path_to_icons .. "/mail-mark-unread.png") email_widget:set_text(stdout) elseif (unread_emails_num == 0) then - email_icon:set_image(path_to_icons .. "/mail-message-new.png") - email_widget:set_text("") - end + email_icon:set_image(path_to_icons .. "/mail-message-new.png") + email_widget:set_text("") + end end ) -function show_emails() +local function show_emails() awful.spawn.easy_async([[bash -c 'python /home//.config/awesome/email-widget/read_unread_emails.py']], - function(stdout, stderr, reason, exit_code) + function(stdout) naughty.notify{ text = stdout, title = "Unread Emails", -- cgit v1.2.3