summaryrefslogtreecommitdiff
path: root/email-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2020-12-06 14:47:40 -0500
committerstreetturtle <streetturtle@gmail.com>2020-12-06 14:47:40 -0500
commited2b256407291d8edadfcea9380029633cc7d9d8 (patch)
tree620436e3e2da17cb8351506a29143fb5b2165a2d /email-widget
parenta0cd854a4d36167456bb28d255bf96a32321bf2a (diff)
fix more warnings
Diffstat (limited to 'email-widget')
-rw-r--r--email-widget/email.lua18
1 files changed, 9 insertions, 9 deletions
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/<username>/.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/<username>/.config/awesome/email-widget/read_unread_emails.py']],
- function(stdout, stderr, reason, exit_code)
+ function(stdout)
naughty.notify{
text = stdout,
title = "Unread Emails",