Update copyright dates, allow space indents in wmiirc key/event specs, fix 'Urgent toggle'.

This commit is contained in:
Kris Maglione 2009-05-13 12:57:22 -04:00
parent e8cb0b7a87
commit fac8780e4b
38 changed files with 92 additions and 74 deletions

View File

@ -1,4 +1,4 @@
© 2006-2007 Kris Maglione <fbsdaemon@gmail.com>
© 2006-2009 Kris Maglione <fbsdaemon@gmail.com>
© 2003-2006 Anselm R. Garbe <garbeam at suckless dot org>
Permission is hereby granted, free of charge, to any person obtaining a

View File

@ -1,4 +1,4 @@
/* Copyright ©2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2008-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2006-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#define EXTERN
@ -9,7 +9,7 @@
#include <string.h>
#include "fns.h"
static const char version[] = "click-"VERSION", ©2008 Kris Maglione\n";
static const char version[] = "click-"VERSION", ©2009 Kris Maglione\n";
static void
usage(void) {

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2006-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2006-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#define IXP_NO_P9_
@ -13,7 +13,7 @@
#include "fns.h"
#define link _link
static const char version[] = "wimenu-"VERSION", ©2008 Kris Maglione\n";
static const char version[] = "wimenu-"VERSION", ©2009 Kris Maglione\n";
static IxpClient* client;
static IxpCFid* ctlfid;
static Biobuf* inbuf;

View File

@ -272,6 +272,14 @@ kdown_event(Window *w, XKeyEvent *e) {
case XK_E:
menu_cmd(FORWARD, LINE);
return;
case XK_b:
case XK_B:
menu_cmd(BACKWARD, CHAR);
return;
case XK_f:
case XK_F:
menu_cmd(FORWARD, CHAR);
return;
case XK_n:
case XK_N:
menu_cmd(HIST, FORWARD);
@ -325,6 +333,14 @@ kdown_event(Window *w, XKeyEvent *e) {
case XK_G:
menu_cmd(CMPL_LAST, 0);
return;
case XK_b:
case XK_B:
menu_cmd(BACKWARD, WORD);
return;
case XK_f:
case XK_F:
menu_cmd(FORWARD, WORD);
return;
}
}
switch(ksym) {

View File

@ -1,4 +1,4 @@
/* Copyright ©2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2008-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2006-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2007-2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2007-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2006-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#define EXTERN

View File

@ -1,4 +1,4 @@
/* Copyright ©2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyright ©2008-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2008-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
@ -239,9 +239,8 @@ char**
comm(int cols, char **toka, char **tokb) {
Vector_ptr vec;
char **ret;
int cmp, len;
int cmp;
len = 0;
vector_pinit(&vec);
while(*toka || *tokb) {
if(!*toka)
@ -251,22 +250,16 @@ comm(int cols, char **toka, char **tokb) {
else
cmp = strcmp(*toka, *tokb);
if(cmp < 0) {
if(cols & CLeft) {
if(cols & CLeft)
vector_ppush(&vec, *toka);
len += strlen(*toka) + 1;
}
toka++;
}else if(cmp > 0) {
if(cols & CRight) {
if(cols & CRight)
vector_ppush(&vec, *tokb);
len += strlen(*tokb) + 1;
}
tokb++;
}else {
if(cols & CCenter) {
if(cols & CCenter)
vector_ppush(&vec, *toka);
len += strlen(*toka) + 1;
}
toka++;
tokb++;
}

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
@ -629,7 +629,7 @@ fullscreen(Client *c, int fullscreen) {
}
void
client_seturgent(Client *c, bool urgent, int from) {
client_seturgent(Client *c, int urgent, int from) {
XWMHints *wmh;
char *cfrom, *cnot;
Frame *f, *ff;

View File

@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2007-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2007-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -84,7 +84,7 @@ void client_prop(Client*, Atom);
void client_reparent(Client*, Window*, Point);
void client_resize(Client*, Rectangle);
void client_setcursor(Client*, Cursor);
void client_seturgent(Client*, bool, int);
void client_seturgent(Client*, int, int);
void client_setviews(Client*, char**);
void client_unmap(Client*, int state);
Frame* client_viewframe(Client *c, View *v);

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
@ -212,8 +212,10 @@ dostat(Stat *s, IxpFileId *f) {
s->muid = user;
}
/* All lookups and directory organization should be performed through
* lookup_file, mostly through the dirtabs[] tree. */
/*
* All lookups and directory organization should be performed through
* lookup_file, mostly through the dirtab[] tree.
*/
static IxpFileId*
lookup_file(IxpFileId *parent, char *name)
{
@ -249,12 +251,15 @@ lookup_file(IxpFileId *parent, char *name)
file->p.client = c;
file->id = c->w.w;
file->index = c->w.w;
}if(name) goto LastItem;
}
if(name)
goto LastItem;
}
SET(id);
if(name) {
id = (uint)strtol(name, &name, 16);
if(*name) goto NextItem;
if(*name)
goto NextItem;
}
for(c=client; c; c=c->next) {
if(!name || c->w.w == id) {
@ -264,7 +269,8 @@ lookup_file(IxpFileId *parent, char *name)
file->id = c->w.w;
file->index = c->w.w;
assert(file->tab.name);
if(name) goto LastItem;
if(name)
goto LastItem;
}
}
break;
@ -273,7 +279,8 @@ lookup_file(IxpFileId *parent, char *name)
if(!name || !strcmp(name, debugtab[i])) {
push_file(debugtab[i]);
file->id = i;
if(name) goto LastItem;
if(name)
goto LastItem;
}
break;
case FsDTags:
@ -283,7 +290,9 @@ lookup_file(IxpFileId *parent, char *name)
file->volatil = true;
file->p.view = selview;
file->id = selview->id;
}if(name) goto LastItem;
}
if(name)
goto LastItem;
}
for(v=view; v; v=v->next) {
if(!name || !strcmp(name, v->name)) {
@ -291,7 +300,8 @@ lookup_file(IxpFileId *parent, char *name)
file->volatil = true;
file->p.view = v;
file->id = v->id;
if(name) goto LastItem;
if(name)
goto LastItem;
}
}
break;
@ -302,7 +312,8 @@ lookup_file(IxpFileId *parent, char *name)
file->volatil = true;
file->p.bar = b;
file->id = b->id;
if(name) goto LastItem;
if(name)
goto LastItem;
}
}
break;
@ -329,7 +340,8 @@ lookup_file(IxpFileId *parent, char *name)
file->p.rule = &def.tagrules;
break;
}
if(name) goto LastItem;
if(name)
goto LastItem;
}
NextItem:
continue;
@ -466,7 +478,8 @@ fs_read(Ixp9Req *r) {
return;
}
r->ofcall.io.data = smprint("%C", f->p.client);
r->ofcall.io.count = strlen(r->ofcall.io.data); /* will die if nil */
/* Will (and should) die if result is nil */
r->ofcall.io.count = strlen(r->ofcall.io.data);
respond(r, nil);
return;
case FsFTindex:
@ -483,10 +496,7 @@ fs_read(Ixp9Req *r) {
return;
}
}
/*
* This is an assert because this should this should not be called if
* the file is not open for reading.
*/
/* This should not be called if the file is not open for reading. */
die("Read called on an unreadable file");
}
@ -566,9 +576,7 @@ fs_write(Ixp9Req *r) {
return;
}
/*
* This is an assert because this function should not be called if
* the file is not open for writing.
*/
/* This should not be called if the file is not open for writing. */
die("Write called on an unwritable file");
}

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <fbsdaemon at Gmail>
/* Copyright ©2006-2009 Kris Maglione <fbsdaemon at Gmail>
* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#define EXTERN
@ -16,7 +16,7 @@
#include "fns.h"
static const char
version[] = "wmii-"VERSION", ©2008 Kris Maglione\n";
version[] = "wmii-"VERSION", ©2009 Kris Maglione\n";
static char* address;
static char* ns_path;

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2008-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
* Copyright ©2006-2008 Kris Maglione <maglione.k at Gmail>
* Copyright ©2006-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2007-2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2007-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#define _X11_VISIBLE

View File

@ -1,4 +1,4 @@
/* Copyright ©2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2008-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"

View File

@ -1,4 +1,4 @@
/* Copyright ©2008 Kris Maglione <maglione.k at Gmail>
/* Copyright ©2008-2009 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#define _X11_VISIBLE

View File

@ -1,4 +1,4 @@
/* Copyight ©2007-2008 Kris Maglione <fbsdaemon@gmail.com>
/* Copyight ©2007-2009 Kris Maglione <fbsdaemon@gmail.com>
* See LICENSE file for license details.
*/
#define IXP_NO_P9_
@ -384,7 +384,7 @@ main(int argc, char *argv[]) {
ARGBEGIN{
case 'v':
print("%s-" VERSION ", ©2008 Kris Maglione\n", argv0);
print("%s-" VERSION ", ©2009 Kris Maglione\n", argv0);
exit(0);
case 'a':
address = EARGF(usage());

View File

@ -2,11 +2,12 @@ MKSHELL=rc
path=$PLAN9/bin $path
eps = wmii.eps
calc = rc -c 'hoc -e $"*'
epsbox = `{sed -n '/^%%BoundingBox:/{s/.*://p; q;}' $eps}
iconwidth = 154
iconscale = `{*=$epsbox; hoc -e $iconwidth/'('$3-' '$1')'}
iconheight = `{*=$epsbox; hoc -e '('$4-' '$2')*'$iconscale}
iconscale = `{*=$epsbox; $calc $iconwidth / '('$3 - $1')'}
iconheight = `{*=$epsbox; $calc '('$4 - $2') *' $iconscale}
%.png: %.eps
* = `{hoc -e'-('$epsbox')'}

View File

@ -51,7 +51,7 @@ echo $WMII_NORMCOLORS | wmiir create $noticebar
# Event processing
events() {
sed 's/^ //' <<'!'
cat <<'!'
# Events
Event CreateTag
echo "$WMII_NORMCOLORS" "$@" | wmiir create "/lbar/$@"
@ -186,7 +186,7 @@ events() {
wmiir xwrite /tag/sel/ctl send sel up
!
for i in 0 1 2 3 4 5 6 7 8 9; do
sed 's/^ //' <<!
cat <<'!'
Key $MODKEY-$i
wmiir xwrite /ctl view "$i"
Key $MODKEY-Shift-$i
@ -195,7 +195,7 @@ events() {
done
}
wi_events <<!
$(events)
$(events | sed 's/^ \|^ //')
$(local_events)
!
unset events local_events