Re: [dwm] dwm new message notification

2007-12-12 Thread Martin Sander
On Tue, Dec 11, 2007 at 11:28:08PM -0500, Ritesh Kumar wrote:
 I think gmail supports RSS for getting unread mail. I clicked on the little
 feed icon in my firefox urlbar and I got an RSS page. I guess a little grep
 over that should do the trick. Do tell us if that works!

Hey, I had a little conversation with Jeremy via private mail, and here
is our conclusion:

$ cat ~/.fetchmailrc:
poll *MAIL.MYMAILSERVER.ORG* with
  proto IMAP
  user *JOHN_DOE*
  there with password *VERYSECRETANDSECUREPASSWORD*
  is *JOHNNY* here
  keep

$ fetchmail -c
3 messages (2 seen) for [EMAIL PROTECTED] at +imap.fakegmail.com

$ fetchmail -c|sed 's/(//'|awk '{print $1-$3}'
1

Martin



Re: [dwm] dwm new message notification

2007-12-12 Thread Robert Manea
* Jeremy O'Brien ([EMAIL PROTECTED]) wrote:

Hi.

[...]
 email is out of the question. So for now I think I'll just rely on
 peeking at mutt every so often to see if I have no email. I can cope. :)

You might also check out if this
   http://robm.selfip.net/wiki.sh/-main/DzenGmailNotify
fits your needs.


Bye, Rob.



Re: [dwm] dwm new message notification

2007-12-12 Thread Anselm R. Garbe
A minor remark:

On Wed, Dec 12, 2007 at 07:08:28PM +0100, Anselm R. Garbe wrote:
 I believe dzen is a good option as status text replacment, but
 there is no interface for tagging, and other notifications
 (client title, etc.) in dwm. So consider patching way and wah

 for the purpose of reserving some space for dzen at the opposite
 position to the dwm bar.

Note, don't get irritated by 'way' and 'wah', which are the dwm
variables representing the _Y_-offset resp. _H_eight of the
_W_indow _A_rea in use.

Regards,
-- 
 Anselm R. Garbe  http://www.suckless.org/  GPG key: 0D73F361



Re: [dwm] dwm new message notification

2007-12-11 Thread Martin Sander
On Mon, Dec 10, 2007 at 03:32:14PM -0500, Jeremy O'Brien wrote:
 Is there a way to get new mail notifications from IMAP that would be
 suitable for the bar?  Thank you!

I don't know what you are thinking of exactly, but I used to use

fetchmail -c | sed -e 's/[^0-9 (]//g' -e 's/(/-/'|bc`  ~/.mailcheck

in a cronjob (shows the number of new messages). Then I switched to
offlineimap to sync the mail to my computer, you can then count the new
messages in your Maildir or sed the output of offlineimap.

Greets

Martin



Re: [dwm] dwm new message notification

2007-12-11 Thread Engin Tola

I just check the size of the mail file to see if it is non-zero. And
then I print an 'M' to my status bar like this: 

mail_file=/var/mail/tola
if [ -s $mail_file ]
then
mail=M
else
mail=''
fi


Martin Sander [EMAIL PROTECTED] writes:

 On Mon, Dec 10, 2007 at 03:32:14PM -0500, Jeremy O'Brien wrote:
 Is there a way to get new mail notifications from IMAP that would be
 suitable for the bar?  Thank you!

 I don't know what you are thinking of exactly, but I used to use

   fetchmail -c | sed -e 's/[^0-9 (]//g' -e 's/(/-/'|bc`  ~/.mailcheck

 in a cronjob (shows the number of new messages). Then I switched to
 offlineimap to sync the mail to my computer, you can then count the new
 messages in your Maildir or sed the output of offlineimap.

 Greets

 Martin


-- 
engin tola - http://cvlab.epfl.ch/~tola
emacs  - http://www.gnu.org/software/emacs/tour



Re: [dwm] dwm new message notification

2007-12-11 Thread Jeremy O'Brien
On Tue, Dec 11, 2007 at 03:53:20PM +0100, Antoni Grzymala wrote:
 Engin Tola dixit (2007-12-11, 14:46):
 
  I just check the size of the mail file to see if it is non-zero. And
  then I print an 'M' to my status bar like this:
 
  mail_file=/var/mail/tola
  if [ -s $mail_file ]
  then
  mail=M
  else
  mail=''
  fi
 
 I have a background fetchmail (via postfix and procmail) fetching my
 e-mails to my maildirs (most of the mail gets into the INBOX, while the
 mailing lists (like dwm) are sorted out into specific folders.
 
 Here's the bit of my statusbar script for displaying the number of
 unread messages in respective maildirs:
 
 
 # Maildir UNREAD messages (deforked, pure bash version)
 
 for dir in /var/spool/mail/antoni/new/ /home/antoni/mail/*/new/; do
 count=0
 for k in ${dir}/*; do
 [[ -f ${k} ]]  ((count++))
 done
 
 if [[ ${count} -ne 0 ]]; then
 dir=${dir/\/var\/spool\/mail\/antoni\/new\//Spool}
 dir=${dir/\/home\/antoni\/mail\//}
 dir=${dir/\/new\//}
 MAIL=${dir}: ${count} ยท ${MAIL}
 fi
 done
 
 
 
 Best,
 
 -- 
 [a]

Haha. You gave me this script before, and it was the one that I was
previously using. Worked like a charm! Unfortunately, IMAP works
differently and doesn't populate my ~/.maildir directory anymore :(
Thank you though! :)

-- 
Jeremy O'Brien aka neutral_insomniac
GPG key: 0xB1140FDB http://pohl.ececs.uc.edu/~jeremy/jeremy.asc
Linux ambelina 2.6.22.9 #1 Zilog(R) Z80
processor 4MHz GNU/Linux


signature.asc
Description: Digital signature


Re: [dwm] dwm new message notification

2007-12-11 Thread Antoni Grzymala
Jeremy O'Brien dixit (2007-12-11, 12:37):

 Haha. You gave me this script before, and it was the one that I was
 previously using. Worked like a charm! Unfortunately, IMAP works
 differently and doesn't populate my ~/.maildir directory anymore :(
 Thank you though! :)

LOL, excuse my Alzheimer. Do you need to access Gmail via IMAP? I
fetchmail my mail the usual way with POP3. Obviously it does not
presever the mailbox layout in Gmail. Not really sure, what your needs
are.

Best,

-- 
[a]


signature.asc
Description: Podpis cyfrowy :: Digital signature


Re: [dwm] dwm new message notification

2007-12-11 Thread Jeremy O'Brien
On Tue, Dec 11, 2007 at 06:47:00PM +0100, Antoni Grzymala wrote:
 Jeremy O'Brien dixit (2007-12-11, 12:37):
 
  Haha. You gave me this script before, and it was the one that I was
  previously using. Worked like a charm! Unfortunately, IMAP works
  differently and doesn't populate my ~/.maildir directory anymore :(
  Thank you though! :)
 
 LOL, excuse my Alzheimer. Do you need to access Gmail via IMAP? I
 fetchmail my mail the usual way with POP3. Obviously it does not
 presever the mailbox layout in Gmail. Not really sure, what your needs
 are.
 
 Best,
 
 -- 
 [a]

Heh, no problem. :) I am accessing Gmail just fine using mutt and IMAP.
The problem I have now is finding a way to show the number of new
emails in my status bar like your script did so wonderfully before.
The solution that Martin Sander gave seemed adequate, but the script
failed. I'm assuming it was a typo somewhere :( I would like to start
using offlineimap too, as this seems to be the best of both worlds
(offline mail reading + supercool synchronization), but my net
connection at my house right now is crap, and downloading 500MB+ of
email is out of the question. So for now I think I'll just rely on
peeking at mutt every so often to see if I have no email. I can cope. :)

-- 
Jeremy O'Brien aka neutral_insomniac
GPG key: 0xB1140FDB http://pohl.ececs.uc.edu/~jeremy/jeremy.asc
Linux ambelina 2.6.22.9 #1 Zilog(R) Z80
processor 4MHz GNU/Linux


signature.asc
Description: Digital signature


Re: [dwm] dwm new message notification

2007-12-11 Thread Ritesh Kumar
I think gmail supports RSS for getting unread mail. I clicked on the little
feed icon in my firefox urlbar and I got an RSS page. I guess a little grep
over that should do the trick. Do tell us if that works!

Ritesh

On Dec 11, 2007 1:05 PM, Jeremy O'Brien [EMAIL PROTECTED] wrote:

 On Tue, Dec 11, 2007 at 06:47:00PM +0100, Antoni Grzymala wrote:
  Jeremy O'Brien dixit (2007-12-11, 12:37):
 
   Haha. You gave me this script before, and it was the one that I was
   previously using. Worked like a charm! Unfortunately, IMAP works
   differently and doesn't populate my ~/.maildir directory anymore :(
   Thank you though! :)
 
  LOL, excuse my Alzheimer. Do you need to access Gmail via IMAP? I
  fetchmail my mail the usual way with POP3. Obviously it does not
  presever the mailbox layout in Gmail. Not really sure, what your needs
  are.
 
  Best,
 
  --
  [a]

 Heh, no problem. :) I am accessing Gmail just fine using mutt and IMAP.
 The problem I have now is finding a way to show the number of new
 emails in my status bar like your script did so wonderfully before.
 The solution that Martin Sander gave seemed adequate, but the script
 failed. I'm assuming it was a typo somewhere :( I would like to start
 using offlineimap too, as this seems to be the best of both worlds
 (offline mail reading + supercool synchronization), but my net
 connection at my house right now is crap, and downloading 500MB+ of
 email is out of the question. So for now I think I'll just rely on
 peeking at mutt every so often to see if I have no email. I can cope. :)

 --
 Jeremy O'Brien aka neutral_insomniac
 GPG key: 0xB1140FDB 
 http://pohl.ececs.uc.edu/~jeremy/jeremy.aschttp://pohl.ececs.uc.edu/%7Ejeremy/jeremy.asc
 Linux ambelina 2.6.22.9 #1 Zilog(R) Z80
 processor 4MHz GNU/Linux

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)

 iD8DBQFHXtFtJUoJkLEUD9sRAhGJAJ9/wLHYinNV7dJsVc81PpyE2zj7xgCgh4sp
 xafLvQhi71rSCx1FbEzM/i0=
 =55kj
 -END PGP SIGNATURE-