You are not logged in.
How to script a new mail alert, I'm using Mutt MUA ?
Now, I've this in my rc.lua but I'm not on gmail.
-- Gmail widget
mygmail = wibox.widget.textbox()
gmail_t = awful.tooltip({ objects = { mygmail },})
mygmailimg = wibox.widget.imagebox(beautiful.widget_gmail)
vicious.register(mygmail, vicious.widgets.gmail,
function (widget, args)
gmail_t:set_text(args["{subject}"])
gmail_t:add_to_object(mygmailimg)
return args["{count}"]
end, 10)
mygmail:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail, false) end)))
Offline
You are not using gmail, so you can't use a gmail specific tool. You tell us your client (mutt), but that is irrelevant. Your mail *server* or provider is what is relevant.
If you use something like offlineimap to sync a local maildir then this is as simple as checking the number of files in /path/to/mail/inbox/new/
Edit: here is a github gist with a slightly modified excerpt from my status line tool (for a different WM).
Edit2: a quick google lead to this solution for imap.
Last edited by Trilby (2013-08-28 17:04:19)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
There is also something in "Community Contributions" that is a wrapper around offlineimap that will actually send real notifications. But of course you would have to be using offlineimap. Otherwise, mutt itself actually sends EWMH notifications, so if you get new mail the terminal will me marked as "urgent" or your WM's equivalent.
... oh, I just reread your post, and it seems that you are actually trying to have your Awesome panel display these notifications, yes? In that case, I'll reiterate what Trilby said: You need to be more specific about what you are trying to do and actually provide real relevant details.
Offline
Thanks for answer.
I would like a mail notify like this https://github-camo.global.ssl.fastly.n … 382e6a7067
A mail counter
Offline
Again, you need to tell us what type of mail setup you have. There is no generic way of doing this - it depends on your mail service.
Is it imap, is it pop, is it a local mail dir, is it delivered by homing pigeon? These will all lead to different solutions - a local maildir is (again) by far the easiest (IMHO).
Last edited by Trilby (2013-08-28 17:05:20)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I've a mail account in mailoo.org, I use IMAP, but Mutt creates a new file when new mail in the INBOX folder.
Offline
Again, have you checked the awesome wiki?
http://awesome.naquadah.org/wiki/Email_ … ntegration
Offline
Yeah, but I'm a biginner, I've just change the path where my imaps mail arrived.
It's was not working.
Offline
Yeah, but I'm a biginner, I've just change the path where my imaps mail arrived.
What does this mean? imap mail doesn't have a "path". 2MG, correct me if I'm wrong, but it looks like that lua code is for maildir only.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I've tried to use the script, I only modified the
maildir = "/home/user/Mail",by
maildir = "/home/$USER/.mutt/cache/imaps:mail.mailoo.org/INBOX"Is that correct ?
Last edited by NeanderMarcl (2013-08-28 17:34:45)
Offline
I don't know, as you haven't yet answered my repeated question of whether you have a local maildir.
Does that directory exist, if so, are there three sub directories named cur, new, and tmp, the first two of which may contain files with long names?
At the very least, I suspect you'd have to at least also modify the accounts variable. And this is still assuming you have such a local maildir.
Last edited by Trilby (2013-08-28 17:58:17)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I have a local mail dir.
This directory exists but there is not cur, new and tmps in it, the files in INBOX dir are named like that "1471590186-107"
Yeah I've modified the variable.
Offline
I tried
mboxwidget = widget({ type = "textbox" })
vicious.register(mboxwidget, vicious.widgets.mbox, "$1", 5, "/home/julien/.mutt/cache/imaps:@mailoo.org@mail.mailoo.org:993/INBOX")the error is
attempt to call global 'widget' a nil valueHow can I fix it ?
Last edited by NeanderMarcl (2013-08-28 18:36:31)
Offline
I have a local mail dir.
This directory exists but there is not cur, new and tmps in it
Then it is not a maildir.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Okay, but it's the only folder I have in the .mutt
Offline
What makes you think you should point that to anything in ~/.mutt?
It looks like you have mutt configured to read from an imap server and you don't have a local maildir (questions I asked at the very beginning of this thread). So you either need to set up something like offlineimap to sync a local maildir, or you need to find a tool that will query imap servers, like the one I linked to in my first response in this thread.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I've read in the Arch wiki
set folder=imaps://imap.gmail.com/
I replace it by the mailoo and when I search in my .mutt, I've seen the imaps folder.
Offline
I tried delightful.widget.imap but without success..
Last edited by NeanderMarcl (2013-08-28 21:27:34)
Offline
I try to modify the .offlineimapr as in the Arch wiki
~/.offlineimaprc
[mbnames]
enabled = yes
filename = /home/julien/.mutt/cache/imaps:@mailoo.org@mail.mailoo.org:993/INBO
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"It's not working.
Offline
t's not working.
This is not an error message. Please read How To Ask Questions The Smart Way and try
and make your posts more meaningful and less like help vampirism.
Offline