wmbiff: Remove Licq, gnomeicu and finger support
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
		
							parent
							
								
									a0e1495bd6
								
							
						
					
					
						commit
						623336526b
					
				
					 9 changed files with 6 additions and 154 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
SUBDIRS = wmgeneral wmbiff autoconf scripts
 | 
			
		||||
EXTRA_DIST = ChangeLog FAQ README.licq TODO
 | 
			
		||||
EXTRA_DIST = ChangeLog FAQ TODO
 | 
			
		||||
 | 
			
		||||
ACLOCAL_FLAGS = -I autoconf
 | 
			
		||||
## dummies.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,23 +0,0 @@
 | 
			
		|||
wmBiff with ICQ arrival notification
 | 
			
		||||
------------------------------------
 | 
			
		||||
 | 
			
		||||
This is a version of Gennady Belyakov's wmBiff Window Maker doc app hacked
 | 
			
		||||
to show licq message arrivals.
 | 
			
		||||
 | 
			
		||||
Motivation:
 | 
			
		||||
Ever found the screen space taken up by licq clients to be too much, but
 | 
			
		||||
don't like to have them beeping when messages are arrived, so you can't put
 | 
			
		||||
them in the background? So did I.
 | 
			
		||||
 | 
			
		||||
Solution:
 | 
			
		||||
wmBiff with ICQ arrival notification.
 | 
			
		||||
Works alongside licq <http://www.licq.com>, and displays the number of messages
 | 
			
		||||
sitting in a licq history file. When a message arrives, this file is updated,
 | 
			
		||||
so wmBiff flashes and (optionally, if you like that sort of thing) makes noises.
 | 
			
		||||
And, it checks regular mailboxes and pop3 servers for mail!
 | 
			
		||||
 | 
			
		||||
What more could you wish?
 | 
			
		||||
 | 
			
		||||
Simply add entries in the .wmbiffrc file with licq: prefixing the path.
 | 
			
		||||
 | 
			
		||||
Enjoy!
 | 
			
		||||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
   Modified : Yong-iL Joh ( tolkien@mizi.com )
 | 
			
		||||
   Modified : Jorge García ( Jorge.Garcia@uv.es )
 | 
			
		||||
 *
 | 
			
		||||
 * Email Checker Pop3/Imap4/Licq/Gicu/mbox/maildir/finger
 | 
			
		||||
 * Email Checker Pop3/Imap4/Gicu/mbox/maildir/finger
 | 
			
		||||
 *
 | 
			
		||||
 * Last Updated : $Date: 2005/05/08 21:31:22 $
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			@ -109,7 +109,6 @@ typedef struct _mbox_t {
 | 
			
		|||
/* creation calls must have this prototype */
 | 
			
		||||
int pop3Create( /*@notnull@ */ Pop3 pc, const char *str);
 | 
			
		||||
int imap4Create( /*@notnull@ */ Pop3 pc, const char *str);
 | 
			
		||||
int licqCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
			
		||||
int shellCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
			
		||||
int mboxCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
			
		||||
int maildirCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,89 +0,0 @@
 | 
			
		|||
/* $Id: LicqClient.c,v 1.11 2002/06/21 04:31:31 bluehal Exp $ */
 | 
			
		||||
/* Author : Yong-iL Joh ( tolkien@mizi.com )
 | 
			
		||||
   Modified: Jorge García ( Jorge.Garcia@uv.es )
 | 
			
		||||
 * 
 | 
			
		||||
 * LICQ checker.
 | 
			
		||||
 *
 | 
			
		||||
 * Last Updated : $Date: 2002/06/21 04:31:31 $
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_CONFIG_H
 | 
			
		||||
#include <config.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "Client.h"
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#include <utime.h>
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#ifdef USE_DMALLOC
 | 
			
		||||
#include <dmalloc.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define PCM     (pc->u).mbox
 | 
			
		||||
 | 
			
		||||
int licqCheckHistory( /*@notnull@ */ Pop3 pc)
 | 
			
		||||
{
 | 
			
		||||
	struct utimbuf ut;
 | 
			
		||||
 | 
			
		||||
	DM(pc, DEBUG_INFO, ">Mailbox: '%s'\n", pc->path);
 | 
			
		||||
 | 
			
		||||
	if (fileHasChanged(pc->path, &ut.actime, &PCM.mtime, &PCM.size) != 0
 | 
			
		||||
		|| pc->OldMsgs < 0) {
 | 
			
		||||
		FILE *F;
 | 
			
		||||
		char buf[1024];
 | 
			
		||||
		int count_status = 0;
 | 
			
		||||
 | 
			
		||||
		F = openMailbox(pc, pc->path);
 | 
			
		||||
		if (F == NULL)
 | 
			
		||||
			return -1;
 | 
			
		||||
		/* count message */
 | 
			
		||||
		while (fgets(buf, BUF_SIZE, F)) {
 | 
			
		||||
			if ((buf[0] == '[') || (buf[0] == '-')) {	/* new, or old licq */
 | 
			
		||||
				count_status++;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		(void) fclose(F);
 | 
			
		||||
 | 
			
		||||
		pc->TotalMsgs = count_status * 2;
 | 
			
		||||
		pc->UnreadMsgs = pc->TotalMsgs - count_status;
 | 
			
		||||
		DM(pc, DEBUG_INFO, "from: %d status: %d\n", pc->TotalMsgs,
 | 
			
		||||
		   pc->UnreadMsgs);
 | 
			
		||||
 | 
			
		||||
		/* Not clear that resetting the mtime is useful, as
 | 
			
		||||
		   mutt is not involved.  Unfortunately, I
 | 
			
		||||
		   (nspring/blueHal) can't tell whether this
 | 
			
		||||
		   cut-and-pasted code is needed */
 | 
			
		||||
		ut.modtime = PCM.mtime;
 | 
			
		||||
		utime(pc->path, &ut);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int licqCreate( /*@notnull@ */ Pop3 pc, const char *str)
 | 
			
		||||
{
 | 
			
		||||
	/* LICQ format: licq:fullpathname */
 | 
			
		||||
 | 
			
		||||
	pc->TotalMsgs = 0;
 | 
			
		||||
	pc->UnreadMsgs = 0;
 | 
			
		||||
	pc->OldMsgs = -1;
 | 
			
		||||
	pc->OldUnreadMsgs = -1;
 | 
			
		||||
	pc->checkMail = licqCheckHistory;
 | 
			
		||||
 | 
			
		||||
	strcpy(pc->path, str + 5);	/* cut off ``licq:'' */
 | 
			
		||||
 | 
			
		||||
	DM(pc, DEBUG_INFO, "licq: str = '%s'\n", str);
 | 
			
		||||
	DM(pc, DEBUG_INFO, "licq: path= '%s'\n", pc->path);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* vim:set ts=4: */
 | 
			
		||||
/*
 | 
			
		||||
 * Local Variables:
 | 
			
		||||
 * tab-width: 4
 | 
			
		||||
 * c-indent-level: 4
 | 
			
		||||
 * c-basic-offset: 4
 | 
			
		||||
 * End:
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
TESTS = test_wmbiff test_tlscomm
 | 
			
		||||
noinst_PROGRAMS = test_wmbiff test_tlscomm
 | 
			
		||||
bin_PROGRAMS = wmbiff
 | 
			
		||||
wmbiff_SOURCES = wmbiff.c socket.c Pop3Client.c LicqClient.c mboxClient.c \
 | 
			
		||||
wmbiff_SOURCES = wmbiff.c socket.c Pop3Client.c mboxClient.c \
 | 
			
		||||
	maildirClient.c Imap4Client.c tlsComm.c tlsComm.h ShellClient.c  \
 | 
			
		||||
	passwordMgr.c passwordMgr.h charutil.c charutil.h Client.h  \
 | 
			
		||||
	regulo.c regulo.h  MessageList.c MessageList.h
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,7 +94,7 @@ install_sh = @install_sh@
 | 
			
		|||
TESTS = test_wmbiff test_tlscomm
 | 
			
		||||
noinst_PROGRAMS = test_wmbiff test_tlscomm
 | 
			
		||||
bin_PROGRAMS = wmbiff
 | 
			
		||||
wmbiff_SOURCES = wmbiff.c socket.c Pop3Client.c LicqClient.c mboxClient.c \
 | 
			
		||||
wmbiff_SOURCES = wmbiff.c socket.c Pop3Client.c mboxClient.c \
 | 
			
		||||
	maildirClient.c Imap4Client.c tlsComm.c tlsComm.h ShellClient.c  \
 | 
			
		||||
	passwordMgr.c passwordMgr.h charutil.c charutil.h Client.h  \
 | 
			
		||||
	regulo.c regulo.h  MessageList.c MessageList.h
 | 
			
		||||
| 
						 | 
				
			
			@ -139,7 +139,7 @@ test_wmbiff_OBJECTS = $(am_test_wmbiff_OBJECTS)
 | 
			
		|||
test_wmbiff_DEPENDENCIES =
 | 
			
		||||
test_wmbiff_LDFLAGS =
 | 
			
		||||
am_wmbiff_OBJECTS = wmbiff.$(OBJEXT) socket.$(OBJEXT) \
 | 
			
		||||
	Pop3Client.$(OBJEXT) LicqClient.$(OBJEXT) mboxClient.$(OBJEXT) \
 | 
			
		||||
	Pop3Client.$(OBJEXT) mboxClient.$(OBJEXT) \
 | 
			
		||||
	maildirClient.$(OBJEXT) Imap4Client.$(OBJEXT) tlsComm.$(OBJEXT) \
 | 
			
		||||
	ShellClient.$(OBJEXT) passwordMgr.$(OBJEXT) charutil.$(OBJEXT) \
 | 
			
		||||
	regulo.$(OBJEXT) MessageList.$(OBJEXT)
 | 
			
		||||
| 
						 | 
				
			
			@ -154,7 +154,6 @@ LIBS = @LIBS@
 | 
			
		|||
depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
 | 
			
		||||
am__depfiles_maybe = depfiles
 | 
			
		||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/Imap4Client.Po \
 | 
			
		||||
@AMDEP_TRUE@	./$(DEPDIR)/LicqClient.Po \
 | 
			
		||||
@AMDEP_TRUE@	./$(DEPDIR)/MessageList.Po \
 | 
			
		||||
@AMDEP_TRUE@	./$(DEPDIR)/Pop3Client.Po \
 | 
			
		||||
@AMDEP_TRUE@	./$(DEPDIR)/ShellClient.Po ./$(DEPDIR)/charutil.Po \
 | 
			
		||||
| 
						 | 
				
			
			@ -236,7 +235,6 @@ distclean-compile:
 | 
			
		|||
	-rm -f *.tab.c
 | 
			
		||||
 | 
			
		||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Imap4Client.Po@am__quote@
 | 
			
		||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LicqClient.Po@am__quote@
 | 
			
		||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageList.Po@am__quote@
 | 
			
		||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pop3Client.Po@am__quote@
 | 
			
		||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ShellClient.Po@am__quote@
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,12 +91,6 @@ action.1=rxvt -name mutt -e mutt -f /home/gb/mail/10_ksi-linux-list
 | 
			
		|||
# notify.1=my_play /home/gb/sounds/new_mail_has_arrived.wav
 | 
			
		||||
# action.1=rxvt -name mutt -e mutt -f /home/gb/Maildir
 | 
			
		||||
 | 
			
		||||
label.2=LICQ
 | 
			
		||||
# LICQ format: licq:fullpathname
 | 
			
		||||
path.2=licq:/home/person/.licq/history/1111111.history
 | 
			
		||||
notify.2=beep
 | 
			
		||||
action.2=licq&
 | 
			
		||||
 | 
			
		||||
#or if you use gnomeicu:
 | 
			
		||||
#label.2=ICQ
 | 
			
		||||
#path.2=gicu:USER_UIN
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ of new mail messages, if any, or the total number of messages.
 | 
			
		|||
It also has mail
 | 
			
		||||
retrieval capabilies, and can be configured to do this automatically. At the
 | 
			
		||||
moment, UNIX-style, maildir, POP3, APOP and IMAP4 mailboxes are supported.
 | 
			
		||||
WMbiff also supports Licq history files and gnomeicu, displaying the number of new
 | 
			
		||||
WMbiff also supports gnomeicu, displaying the number of new
 | 
			
		||||
messages in your running session, as if they were mail.  
 | 
			
		||||
 | 
			
		||||
The mailboxes are displayed in 5 different lines, each one with its own
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -111,30 +111,6 @@ static int mbox_y(unsigned int mboxnum)
 | 
			
		|||
	return ((11 * mboxnum) + y_origin);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* special shortcuts for longer shell client commands */
 | 
			
		||||
static int gicuCreate( /*@notnull@ */ Pop3 pc, const char *path)
 | 
			
		||||
{
 | 
			
		||||
	char buf[255];
 | 
			
		||||
	if (isdigit(path[5])) {
 | 
			
		||||
		sprintf(buf,
 | 
			
		||||
				"shell:::echo `gnomeicu-client -u%s msgcount` new",
 | 
			
		||||
				path + 5);
 | 
			
		||||
	} else {
 | 
			
		||||
		sprintf(buf, "shell:::echo `gnomeicu-client msgcount` new");
 | 
			
		||||
	}
 | 
			
		||||
	return (shellCreate(pc, buf));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int fingerCreate( /*@notnull@ */ Pop3 pc, const char *path)
 | 
			
		||||
{
 | 
			
		||||
	char buf[255];
 | 
			
		||||
	sprintf(buf, "shell:::finger -lm %s | "
 | 
			
		||||
			"perl -ne '(/^new mail/i && print \"new\");' "
 | 
			
		||||
			"-e '(/^mail last read/i && print \"old\");' "
 | 
			
		||||
			"-e '(/^no( unread)? mail/i && print \"no\");'", path + 7);
 | 
			
		||||
	return (shellCreate(pc, buf));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* 	Read a line from a file to obtain a pair setting=value
 | 
			
		||||
	skips # and leading spaces
 | 
			
		||||
	NOTE: if setting finish with 0, 1, 2, 3 or 4 last char are deleted and
 | 
			
		||||
| 
						 | 
				
			
			@ -212,9 +188,6 @@ static struct path_demultiplexer paths[] = {
 | 
			
		|||
	{"pop3:", pop3Create},
 | 
			
		||||
	{"pop3s:", pop3Create},
 | 
			
		||||
	{"shell:", shellCreate},
 | 
			
		||||
	{"gicu:", gicuCreate},
 | 
			
		||||
	{"licq:", licqCreate},
 | 
			
		||||
	{"finger:", fingerCreate},
 | 
			
		||||
	{"imap:", imap4Create},
 | 
			
		||||
	{"imaps:", imap4Create},
 | 
			
		||||
	{"sslimap:", imap4Create},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue