You are not logged in.

#1 2021-01-23 10:09:19

Evil_Hamster
Member
Registered: 2021-01-14
Posts: 28

Can not set up email widget in awesomewm

Hi all,

I am using the Awesome WM and it is rather lovely. I have set it up rather nicely (at least I am happy with it) but I got utterly stuck on setting up the mail notification. How do I do it?

I have downloaded my defaults from https://github.com/lcpz/awesome-copycats
and I am trying to get it to work.

I have neomutt installed.

In the https://github.com/lcpz/lain/blob/33c0e … t/imap.lua I changed

    local imap       = { widget = args.widget or wibox.widget.textbox() }
    local server     = imap.google.com                                             <<---
    local mail       = myaccname@gmail.com                                    <<---
    local password   = my password                                                 <<---
    local port       = args.port or 993
    local timeout    = 2 or 60                                                           <<---
    local pwdtimeout = args.pwdtimeout or 10
    local is_plain   = args.is_plain or false
    local followtag  = args.followtag or false
    local notify     = args.notify or "on"
    local settings   = args.settings or function() end

I made the arrows <<--- to indicate my changes. Then, in the https://github.com/lcpz/awesome-copycat … /theme.lua, I uncommented the following part (I removed the "]". In other words, it is now exactly as the quote below.)

-- Mail IMAP check
-- commented because it needs to be set before use
local mailicon = wibox.widget.imagebox()
theme.mail = lain.widget.imap({
    timeout  = 180,
    server   = "server",
    mail     = "mail",
    password = "keyring get mail",
    settings = function()
        if mailcount > 0 then
            mailicon:set_image(theme.widget_mail)
            widget:set_markup(markup.fontfg(theme.font, "#cccccc", mailcount .. " "))
        else
            widget:set_text("")
            --mailicon:set_image() -- not working in 4.0
            mailicon._private.image = nil
            mailicon:emit_signal("widget::redraw_needed")
            mailicon:emit_signal("widget::layout_changed")
        end
    end
})
--]]

But the second I refresh awesome Wm, it crashes, saying that "Oops, an error happoened! .../awesome/rc.lua: attempt to call a nill value (field 'at_screen_connect')" and "Oops, there were errors during startup! error while running function! stack traceback .../awesome/rc.lua: in local 'func' /usr/share/awesome/lib/aweful/screen.lua: in function 'awful.screen.connect_for_erach_screen'..."

I am clearly making a silly mistake, but I am not able to figure it out sad . Can someone explain it to me smile...


Cheers.

Last edited by Evil_Hamster (2021-01-23 10:11:17)

Offline

Board footer

Powered by FluxBB