From mboxrd@z Thu Jan 1 00:00:00 1970 From: garoth@gmail.com (Andrei Thorp) Date: Tue, 9 Jun 2009 10:37:54 -0400 Subject: [sup-talk] Fwd: Gmail Labels Sidebar In-Reply-To: <80055d7c0906090735x581d27a2pfeb3ca2d470bb099@mail.gmail.com> References: <80055d7c0906081737s4dd3e205t2f3e69423ef48e17@mail.gmail.com> <1244509454-sup-1208@ntdws12.chass.utoronto.ca> <1244513641-sup-360@javelin> <1244514031-sup-2335@ntdws12.chass.utoronto.ca> <80055d7c0906090633t2a7aecd6i30578a9976697e4e@mail.gmail.com> <1244556424-sup-1426@tomsk> <1244557461-sup-4140@tomsk> <80055d7c0906090735x581d27a2pfeb3ca2d470bb099@mail.gmail.com> Message-ID: <80055d7c0906090737g46f9f3b3y7ee00b91dbe08f22@mail.gmail.com> > Oh and I forgot - if you want to kick off sup from a click on one of > these labels (assuming you can do something like that in your WM) you > can call sup with --search "label:somelabel" to get that label > displayed. Damn, that's a great idea! I didn't even think about that. /me checks up on what else sup has in its cli flags. Cheers, -AT PS. Well, while I'm here, I guess I'll also mention this fairly obvious script line that just outputs the unread messages in a filtered list: sup-list-labels 2> /dev/null | grep -E "Inbox|Sent" | sed -r "s/^ *([A-Za-z]*).* ([0-9]+) unread/\1: \2/" So to go through this: ?- Pipe the stderr to /dev/null (we don't want to see the messages) ?- grep for either "Inbox" or "Sent" -- you can put lots more |blah|blah there ?- sed magic to extract and reformat the data This might be useful for outputting somewhere like in a shell prompt or panel. PPS. argh, still not using sup for this mailing list so I replied to an individual. Forwarded D: PPPS. Sorry that it wrapped my sed command there, but I'm sure you get the idea. PPPPS. Sorry about the unfashionable amount of PSes ;)