[guide] Some updates to wmii.pdf to track the man pages.

This commit is contained in:
Kris Maglione 2010-06-16 18:32:09 -04:00
parent c3b818e241
commit d9486fa419
12 changed files with 151 additions and 105 deletions

View File

@ -16,7 +16,6 @@ PACKAGES += $(X11PACKAGES)
LIB = $(LIBS9) $(LIBIXP) LIB = $(LIBS9) $(LIBIXP)
LIBS += -lm LIBS += -lm
CFLAGS += -DIXP_NEEDAPI=86
OBJ = main \ OBJ = main \
caret \ caret \
history \ history \

View File

@ -11,7 +11,6 @@ PACKAGES += $(X11PACKAGES)
LIB = $(LIBS9) LIB = $(LIBS9)
LIBS += -lm LIBS += -lm
CFLAGS += -DIXP_NEEDAPI=86
OBJ = main \ OBJ = main \
ewmh \ ewmh \
win win

View File

@ -13,7 +13,6 @@ PACKAGES += $(X11PACKAGES) xext xrandr xrender xinerama
LIB = $(LIBIXP) $(LIBS9) LIB = $(LIBIXP) $(LIBS9)
LIBS += -lm LIBS += -lm
CFLAGS += $(INCICONV) -DIXP_NEEDAPI=97
OBJ = area \ OBJ = area \
bar \ bar \
backtrace \ backtrace \

View File

@ -3,7 +3,6 @@
*/ */
#define _XOPEN_SOURCE 600 #define _XOPEN_SOURCE 600
#define IXP_P9_STRUCTS
#define IXP_NO_P9_ #define IXP_NO_P9_
#include <assert.h> #include <assert.h>
#include <regexp9.h> #include <regexp9.h>

View File

@ -184,7 +184,7 @@ void fs_attach(Ixp9Req*);
void fs_clunk(Ixp9Req*); void fs_clunk(Ixp9Req*);
void fs_create(Ixp9Req*); void fs_create(Ixp9Req*);
void fs_flush(Ixp9Req*); void fs_flush(Ixp9Req*);
void fs_freefid(Fid*); void fs_freefid(IxpFid*);
void fs_open(Ixp9Req*); void fs_open(Ixp9Req*);
void fs_read(Ixp9Req*); void fs_read(Ixp9Req*);
void fs_remove(Ixp9Req*); void fs_remove(Ixp9Req*);

View File

@ -195,7 +195,7 @@ dwrite(int flag, void *buf, int n, bool always) {
static uint fs_size(IxpFileId*); static uint fs_size(IxpFileId*);
static void static void
dostat(Stat *s, IxpFileId *f) { dostat(IxpStat *s, IxpFileId *f) {
s->type = 0; s->type = 0;
s->dev = 0; s->dev = 0;
s->qid.path = QID(f->tab.type, f->id); s->qid.path = QID(f->tab.type, f->id);
@ -363,7 +363,7 @@ fs_attach(Ixp9Req *r) {
r->fid->qid.type = f->tab.qtype; r->fid->qid.type = f->tab.qtype;
r->fid->qid.path = QID(f->tab.type, 0); r->fid->qid.path = QID(f->tab.type, 0);
r->ofcall.rattach.qid = r->fid->qid; r->ofcall.rattach.qid = r->fid->qid;
respond(r, nil); ixp_respond(r, nil);
} }
void void
@ -394,7 +394,7 @@ fs_size(IxpFileId *f) {
void void
fs_stat(Ixp9Req *r) { fs_stat(Ixp9Req *r) {
IxpMsg m; IxpMsg m;
Stat s; IxpStat s;
int size; int size;
char *buf; char *buf;
IxpFileId *f; IxpFileId *f;
@ -402,7 +402,7 @@ fs_stat(Ixp9Req *r) {
f = r->fid->aux; f = r->fid->aux;
if(!ixp_srv_verifyfile(f, lookup_file)) { if(!ixp_srv_verifyfile(f, lookup_file)) {
respond(r, Enofile); ixp_respond(r, Enofile);
return; return;
} }
@ -415,7 +415,7 @@ fs_stat(Ixp9Req *r) {
ixp_pstat(&m, &s); ixp_pstat(&m, &s);
r->ofcall.rstat.stat = (uchar*)m.data; r->ofcall.rstat.stat = (uchar*)m.data;
respond(r, nil); ixp_respond(r, nil);
} }
void void
@ -427,7 +427,7 @@ fs_read(Ixp9Req *r) {
f = r->fid->aux; f = r->fid->aux;
if(!ixp_srv_verifyfile(f, lookup_file)) { if(!ixp_srv_verifyfile(f, lookup_file)) {
respond(r, Enofile); ixp_respond(r, Enofile);
return; return;
} }
@ -443,49 +443,49 @@ fs_read(Ixp9Req *r) {
switch(f->tab.type) { switch(f->tab.type) {
case FsFprops: case FsFprops:
ixp_srv_readbuf(r, f->p.client->props, strlen(f->p.client->props)); ixp_srv_readbuf(r, f->p.client->props, strlen(f->p.client->props));
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFColRules: case FsFColRules:
case FsFRules: case FsFRules:
ixp_srv_readbuf(r, f->p.rule->string, f->p.rule->size); ixp_srv_readbuf(r, f->p.rule->string, f->p.rule->size);
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFKeys: case FsFKeys:
ixp_srv_readbuf(r, def.keys, def.keyssz); ixp_srv_readbuf(r, def.keys, def.keyssz);
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFCtags: case FsFCtags:
ixp_srv_readbuf(r, f->p.client->tags, strlen(f->p.client->tags)); ixp_srv_readbuf(r, f->p.client->tags, strlen(f->p.client->tags));
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFClabel: case FsFClabel:
ixp_srv_readbuf(r, f->p.client->name, strlen(f->p.client->name)); ixp_srv_readbuf(r, f->p.client->name, strlen(f->p.client->name));
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFBar: case FsFBar:
ixp_srv_readbuf(r, f->p.bar->buf, strlen(f->p.bar->buf)); ixp_srv_readbuf(r, f->p.bar->buf, strlen(f->p.bar->buf));
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFRctl: case FsFRctl:
buf = readctl_root(); buf = readctl_root();
ixp_srv_readbuf(r, buf, strlen(buf)); ixp_srv_readbuf(r, buf, strlen(buf));
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFCctl: case FsFCctl:
buf = readctl_client(f->p.client); buf = readctl_client(f->p.client);
ixp_srv_readbuf(r, buf, strlen(buf)); ixp_srv_readbuf(r, buf, strlen(buf));
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFTindex: case FsFTindex:
buf = view_index(f->p.view); buf = view_index(f->p.view);
ixp_srv_readbuf(r, buf, strlen(buf)); ixp_srv_readbuf(r, buf, strlen(buf));
respond(r, nil); ixp_respond(r, nil);
return; return;
case FsFTctl: case FsFTctl:
buf = readctl_view(f->p.view); buf = readctl_view(f->p.view);
n = strlen(buf); n = strlen(buf);
ixp_srv_readbuf(r, buf, n); ixp_srv_readbuf(r, buf, n);
respond(r, nil); ixp_respond(r, nil);
return; return;
} }
} }
@ -502,18 +502,18 @@ fs_write(Ixp9Req *r) {
uint i; uint i;
if(r->ifcall.io.count == 0) { if(r->ifcall.io.count == 0) {
respond(r, nil); ixp_respond(r, nil);
return; return;
} }
f = r->fid->aux; f = r->fid->aux;
if(!ixp_srv_verifyfile(f, lookup_file)) { if(!ixp_srv_verifyfile(f, lookup_file)) {
respond(r, Enofile); ixp_respond(r, Enofile);
return; return;
} }
if(waserror()) { if(waserror()) {
respond(r, ixp_errbuf()); ixp_respond(r, ixp_errbuf());
return; return;
} }
@ -521,11 +521,11 @@ fs_write(Ixp9Req *r) {
case FsFColRules: case FsFColRules:
case FsFRules: case FsFRules:
ixp_srv_writebuf(r, &f->p.rule->string, &f->p.rule->size, 0); ixp_srv_writebuf(r, &f->p.rule->string, &f->p.rule->size, 0);
respond(r, nil); ixp_respond(r, nil);
break; break;
case FsFKeys: case FsFKeys:
ixp_srv_writebuf(r, &def.keys, &def.keyssz, 0); ixp_srv_writebuf(r, &def.keys, &def.keyssz, 0);
respond(r, nil); ixp_respond(r, nil);
break; break;
case FsFClabel: case FsFClabel:
ixp_srv_data2cstring(r); ixp_srv_data2cstring(r);
@ -535,13 +535,13 @@ fs_write(Ixp9Req *r) {
frame_draw(f->p.client->sel); frame_draw(f->p.client->sel);
update_class(f->p.client); update_class(f->p.client);
r->ofcall.io.count = r->ifcall.io.count; r->ofcall.io.count = r->ifcall.io.count;
respond(r, nil); ixp_respond(r, nil);
break; break;
case FsFCtags: case FsFCtags:
ixp_srv_data2cstring(r); ixp_srv_data2cstring(r);
client_applytags(f->p.client, r->ifcall.io.data); client_applytags(f->p.client, r->ifcall.io.data);
r->ofcall.io.count = r->ifcall.io.count; r->ofcall.io.count = r->ifcall.io.count;
respond(r, nil); ixp_respond(r, nil);
break; break;
case FsFBar: case FsFBar:
i = strlen(f->p.bar->buf); i = strlen(f->p.bar->buf);
@ -549,7 +549,7 @@ fs_write(Ixp9Req *r) {
ixp_srv_writebuf(r, &p, &i, 279); ixp_srv_writebuf(r, &p, &i, 279);
bar_load(f->p.bar); bar_load(f->p.bar);
r->ofcall.io.count = i - r->ifcall.io.offset; r->ofcall.io.count = i - r->ifcall.io.offset;
respond(r, nil); ixp_respond(r, nil);
break; break;
case FsFCctl: case FsFCctl:
mf = (MsgFunc)message_client; mf = (MsgFunc)message_client;
@ -563,7 +563,7 @@ fs_write(Ixp9Req *r) {
msg: msg:
errstr = ixp_srv_writectl(r, mf); errstr = ixp_srv_writectl(r, mf);
r->ofcall.io.count = r->ifcall.io.count; r->ofcall.io.count = r->ifcall.io.count;
respond(r, errstr); ixp_respond(r, errstr);
break; break;
case FsFEvent: case FsFEvent:
if(r->ifcall.io.data[r->ifcall.io.count-1] == '\n') if(r->ifcall.io.data[r->ifcall.io.count-1] == '\n')
@ -571,7 +571,7 @@ fs_write(Ixp9Req *r) {
else else
event("%.*s\n", (int)r->ifcall.io.count, r->ifcall.io.data); event("%.*s\n", (int)r->ifcall.io.count, r->ifcall.io.data);
r->ofcall.io.count = r->ifcall.io.count; r->ofcall.io.count = r->ifcall.io.count;
respond(r, nil); ixp_respond(r, nil);
break; break;
default: default:
/* This 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. */
@ -588,7 +588,7 @@ fs_open(Ixp9Req *r) {
f = r->fid->aux; f = r->fid->aux;
if(!ixp_srv_verifyfile(f, lookup_file)) { if(!ixp_srv_verifyfile(f, lookup_file)) {
respond(r, Enofile); ixp_respond(r, Enofile);
return; return;
} }
@ -606,9 +606,9 @@ fs_open(Ixp9Req *r) {
|| (r->ifcall.topen.mode&3) != OREAD && !(f->tab.perm & 0200) || (r->ifcall.topen.mode&3) != OREAD && !(f->tab.perm & 0200)
|| (r->ifcall.topen.mode&3) != OWRITE && !(f->tab.perm & 0400) || (r->ifcall.topen.mode&3) != OWRITE && !(f->tab.perm & 0400)
|| (r->ifcall.topen.mode & ~(3|OAPPEND|OTRUNC))) || (r->ifcall.topen.mode & ~(3|OAPPEND|OTRUNC)))
respond(r, Enoperm); ixp_respond(r, Enoperm);
else else
respond(r, nil); ixp_respond(r, nil);
} }
void void
@ -619,24 +619,24 @@ fs_create(Ixp9Req *r) {
switch(f->tab.type) { switch(f->tab.type) {
default: default:
respond(r, Enoperm); ixp_respond(r, Enoperm);
return; return;
case FsDBars: case FsDBars:
if(!strlen(r->ifcall.tcreate.name)) { if(!strlen(r->ifcall.tcreate.name)) {
respond(r, Ebadvalue); ixp_respond(r, Ebadvalue);
return; return;
} }
bar_create(f->p.bar_p, r->ifcall.tcreate.name); bar_create(f->p.bar_p, r->ifcall.tcreate.name);
f = lookup_file(f, r->ifcall.tcreate.name); f = lookup_file(f, r->ifcall.tcreate.name);
if(!f) { if(!f) {
respond(r, Enofile); ixp_respond(r, Enofile);
return; return;
} }
r->ofcall.ropen.qid.type = f->tab.qtype; r->ofcall.ropen.qid.type = f->tab.qtype;
r->ofcall.ropen.qid.path = QID(f->tab.type, f->id); r->ofcall.ropen.qid.path = QID(f->tab.type, f->id);
f->next = r->fid->aux; f->next = r->fid->aux;
r->fid->aux = f; r->fid->aux = f;
respond(r, nil); ixp_respond(r, nil);
break; break;
} }
} }
@ -648,20 +648,20 @@ fs_remove(Ixp9Req *r) {
f = r->fid->aux; f = r->fid->aux;
if(!ixp_srv_verifyfile(f, lookup_file)) { if(!ixp_srv_verifyfile(f, lookup_file)) {
respond(r, Enofile); ixp_respond(r, Enofile);
return; return;
} }
switch(f->tab.type) { switch(f->tab.type) {
default: default:
respond(r, Enoperm); ixp_respond(r, Enoperm);
return; return;
case FsFBar: case FsFBar:
s = f->p.bar->screen; s = f->p.bar->screen;
bar_destroy(f->next->p.bar_p, f->p.bar); bar_destroy(f->next->p.bar_p, f->p.bar);
bar_draw(s); bar_draw(s);
respond(r, nil); ixp_respond(r, nil);
break; break;
} }
} }
@ -672,7 +672,7 @@ fs_clunk(Ixp9Req *r) {
f = r->fid->aux; f = r->fid->aux;
if(!ixp_srv_verifyfile(f, lookup_file)) { if(!ixp_srv_verifyfile(f, lookup_file)) {
respond(r, nil); ixp_respond(r, nil);
return; return;
} }
@ -694,7 +694,7 @@ fs_clunk(Ixp9Req *r) {
update_keys(); update_keys();
break; break;
} }
respond(r, nil); ixp_respond(r, nil);
} }
void void
@ -707,12 +707,12 @@ fs_flush(Ixp9Req *r) {
if(f->pending) if(f->pending)
ixp_pending_flush(r); ixp_pending_flush(r);
/* else die() ? */ /* else die() ? */
respond(r->oldreq, Einterrupted); ixp_respond(r->oldreq, Einterrupted);
respond(r, nil); ixp_respond(r, nil);
} }
void void
fs_freefid(Fid *f) { fs_freefid(IxpFid *f) {
IxpFileId *id, *tid; IxpFileId *id, *tid;
tid = f->aux; tid = f->aux;

View File

@ -405,7 +405,7 @@ main(int argc, char *argv[]) {
event_debug = debug_event; event_debug = debug_event;
srv.preselect = event_preselect; srv.preselect = event_preselect;
ixp_listen(&srv, sock, &p9srv, serve_9pcon, nil); ixp_listen(&srv, sock, &p9srv, ixp_serve9conn, nil);
ixp_listen(&srv, ConnectionNumber(display), nil, event_fdready, closedisplay); ixp_listen(&srv, ConnectionNumber(display), nil, event_fdready, closedisplay);
def.border = 1; def.border = 1;

View File

@ -34,15 +34,15 @@ static char* fcnames[] = {
}; };
static int static int
qid(Fmt *f, Qid *q) { qid(Fmt *f, IxpQid *q) {
return fmtprint(f, "(%uhd,%uld,%ullx)", q->type, q->version, q->path); return fmtprint(f, "(%uhd,%uld,%ullx)", q->type, q->version, q->path);
} }
int int
Ffmt(Fmt *f) { Ffmt(Fmt *f) {
Fcall *fcall; IxpFcall *fcall;
fcall = va_arg(f->args, Fcall*); fcall = va_arg(f->args, IxpFcall*);
fmtprint(f, "% 2d %s\t", fcall->hdr.tag, fcnames[fcall->hdr.type - TVersion]); fmtprint(f, "% 2d %s\t", fcall->hdr.tag, fcnames[fcall->hdr.type - TVersion]);
switch(fcall->hdr.type) { switch(fcall->hdr.type) {
case TVersion: case TVersion:

6
debian/changelog vendored
View File

@ -1,5 +1,5 @@
wmii-hg (hg2608) unstable; urgency=low wmii-hg (hg2728) unstable; urgency=low
* Closes issue #175. * Remove long deprecated special treatment of the '!' tag.
-- Kris Maglione <jg@suckless.org> Mon, 17 May 2010 12:35:12 -0400 -- Kris Maglione <kris@suckless.org> Tue, 15 Jun 2010 15:13:12 -0400

View File

@ -236,19 +236,24 @@ the state they describe. For instance,
client. If a client is fullscreen, it contains the line: client. If a client is fullscreen, it contains the line:
\begin{code} \begin{code}
Fullscreen on fullscreen on
\end{code} \end{code}
\noindent To change this, you'd update the file with the line \noindent To change this, you'd update the file with the line
% XXX: Broken /ctl cmd. % XXX: Line broken at /ctl cmd.
|Fullscreen off| or even |Fullscreen| |toggle| to toggle |fullscreen off| or even |fullscreen| |toggle| to toggle
the client's fullscreen state. the client's fullscreen state.
The concept of controlling a program via a filesystem derives The concept of controlling a program via a filesystem derives
from Plan 9, where such interfaces are extensive and well from Plan 9, where such interfaces are extensive and well
proven. The metaphor has shown itself to be quite intuitive to proven\footnote{The concept has also taken hold on most Unixes
Unix users, once the shock of a “virtual” filesystem wears off. in the form of \texttt{/proc} and \texttt{/sys} virtual
The flexibility of being able to control \wmii\ from myriad filesystems, but tends to be very kernel-centric. On Plan 9,
where the model is more pervasive, there are more virtual
filesystems for user-level applications than for the kernel.}.
The metaphor has shown itself to be quite intuitive to Unix
users, once the shock of a “virtual” filesystem wears off. The
flexibility of being able to control \wmii\ from myriad
programming languages, including the standard Unix shell and programming languages, including the standard Unix shell and
even from the command line, is well worth the shock. even from the command line, is well worth the shock.
@ -780,8 +785,9 @@ scope of this document.
Key names can be detected by running |xev| from a Key names can be detected by running |xev| from a
terminal, pressing the desired key, and looking at the output terminal, pressing the desired key, and looking at the output
(it's in the parentheses, after the keysym). A \wmii-specific (it's in the parentheses, after the keysym). Or, more simply,
utility is forthcoming. you can run the \man 1 {wikeyname} utility bundled with \wmii\
and press the key you wish to bind.
Examples of key bindings: Examples of key bindings:
@ -874,19 +880,19 @@ writing new values to the control file. For instance, if a
client is fullscreen, its control file will contain the line: client is fullscreen, its control file will contain the line:
\begin{code} \begin{code}
Fullscreen on fullscreen on
\end{code} \end{code}
\noindent To restore the client from fullscreen, either of the \noindent To restore the client from fullscreen, either of the
following lines may be written to its control file: following lines may be written to its control file:
\begin{code} \begin{code}
Fullscreen off fullscreen off
Fullscreen toggle fullscreen toggle
\end{code} \end{code}
When next read, the |Fullscreen on| line will have been replaced When next read, the |fullscreen on| line will have been replaced
with |Fullscreen off|. No care need be taken to preserve the with |fullscreen off|. No care need be taken to preserve the
other contents of the file. They're generated anew each time other contents of the file. They're generated anew each time
it's read. it's read.
@ -903,15 +909,39 @@ client. The files in these directories are:
\item[ctl] The control file. The properties are: \item[ctl] The control file. The properties are:
\index{filesystem!/client/*/@\clientlabel!ctl} \index{filesystem!/client/*/@\clientlabel!ctl}
\begin{description} \begin{description}
\item[Fullscreen] The client's fullscreen state. When \item[allow] The set of unusual actions the client is
allowed to perform, in the same format as the tag set.
\begin{description}
\item[activate] The client is allowed to activate
itself—that is, focus its window and, as the case may
require, uncollapse it and select a tag it resides on.
This flag must be set on a client if you wish it able to
activate itself from the system tray.
\end{description}
\item[floating] Defines whether this client is likely to
float when attached to a new view. May be |on|, |off|,
|always|, or |never|. Ordinarilly, the value changes
automatically whenever the window is moved between the
floating and managed layers. However, setting a value of
|always| or |never| overrides this behavior.
\item[fullscreen] The client's fullscreen state. When
|on|, the client is displayed fullscreen on all of its |on|, the client is displayed fullscreen on all of its
views. Possible values are |on|, |off|, and |toggle|. views. Possible values are |on|, |off|, and |toggle|.
\item[Urgent] The client's urgency state. When |on|, the \item[group] The client's group ID, or 0 if not part of a
client's layout box will be highlighted. Possible values group. Clients tend to open with the same tags and in
are |on|, |off|, and |toggle|. the same columns as the last active member of their
group. Setting this property is only useful when done
via the rules file.
\item[kill] When written, the window is closed politely, \item[kill] When written, the window is closed politely,
if possible. if possible.
\item[pid] Read-only value of the PID of the program that
owns the window, if the value is available and the
process is on the same machine as wmii.
\item[slay] When written, the client is killed peremptorily. \item[slay] When written, the client is killed peremptorily.
\item[tags] The client's tags. The same as the tags file.
\item[urgent] The client's urgency state. When |on|, the
client's layout box will be highlighted. Possible values
are |on|, |off|, and |toggle|.
\end{description} \end{description}
\item[props] The client's window class (the X11 |WM_CLASS| \item[props] The client's window class (the X11 |WM_CLASS|
property) and title string, separated by colons. This file property) and title string, separated by colons. This file
@ -922,14 +952,20 @@ client. The files in these directories are:
\index{filesystem!/client/*/@\clientlabel!label} \index{filesystem!/client/*/@\clientlabel!label}
\item[tags] \item[tags]
\index{filesystem!/client/*/@\clientlabel!tags} \index{filesystem!/client/*/@\clientlabel!tags}
The client's tags. Tag names are separated by |+| The client's tags. Tag names are separated by |+|, |-|, or
signs. Tags beginning and ending with |/| are treated as |^| signs. Tags beginning and ending with |/| are treated as
regular expressions. If the written value begins with a |+| regular expressions, which place the client on any extant
or a |-|, the tags are updated rather than overwritten. Tag matching tag\footnote{While a client with a regex tag will
names which directly follow a |-| sign are removed rather always appear in all matching views, it will not keep those
than added. Regular expression tags which directly follow a views in existence. When the last client explicitly tagged
minus sign are treated as exclusion expressions. For with a view is removed, the view is deleted as soon as it
example, the tag string |+/foo/-/food/| will match the tag becomes inactive.}. If the written value begins with a |+|,
|-|, or |^|, the tags are updated rather than overwritten.
Tag names which directly follow a |-| sign are removed
rather than added, while those following a |^| are toggled.
Regular expression tags which directly follow a minus sign
are treated as exclusion expressions. For example, the tag
string |+/foo/-/food/| will match the tag
|foobar|, but not the tag |foodstand|. |foobar|, but not the tag |foodstand|.
\end{description} \end{description}
@ -967,9 +1003,9 @@ And to manage their tags, we'll need:
«Client Menu Events» ::= «Client Menu Events» ::=
ClientMouseDown) # ClientMouseDown Client ID Button ClientMouseDown) # ClientMouseDown Client ID Button
[ $2 = 3 ] && clickmenu \ [ $2 = 3 ] && clickmenu \
“Delete:xwrite /client/$1/ctl kill” \ “Delete:wmiir xwrite /client/$1/ctl kill” \
“Kill:xwrite /client/$1/ctl slay” \ “Kill: wmiirxwrite /client/$1/ctl slay” \
“Fullscreen:/client/$1/ctl Fullscreen on” “Fullscreen:wmiir xwrite /client/$1/ctl fullscreen on”
\end{code} \end{code}
\subsection{Unresponsive Clients} \subsection{Unresponsive Clients}
@ -1128,8 +1164,8 @@ IDs to prevent untoward effects when this script dies.
«Command Execution Initialization» ::= «Command Execution Initialization» ::=
terminal() { wmiir setsid xterm “$@” } terminal() { wmiir setsid xterm “$@” }
proglist() { proglist() {
IFS=: set -- $1 IFS=:
find -L $@ -maxdepth 1 -perm /111 | sed 1d; s,.*/,, | sort | uniq wmiir proglist $1 | sort | uniq
unset IFS unset IFS
} }
\end{code} \end{code}
@ -1232,22 +1268,35 @@ The root filesystem contains the following:
If there is no nth width, it is given If there is no nth width, it is given
$1/\mbox{ncolth}$ of the screen. $1/\mbox{ncolth}$ of the screen.
\item[tagrules] \item[rules]
\index{filesystem!/!tagrules} \index{filesystem!/!rules}
The |/tagrules| file contains a list of The |/rules| file contains a list of
rules similar to the colrules. These rules specify rules similar to the colrules. These rules set
the tags a client is to be given when it is created. properties for a client when it is created.
Rules are specified: Rules are specified:
\begin{quote}\texttt{ \begin{quote}\texttt{
/regex/ -> tag{\color{gray}[}+tag{\color{gray}]*}} /regex/ -> key{\color{gray}=}value {\color{gray}\ldots}}
\end{quote} \end{quote}
When a client's name:class:title matches
regex, the matching rules are applied. For each
key=value pair, the |ctl| file property matching
key is set to value. Additionally, the following
keys are accepted and have special meaning:
\begin{description}
\item[continue]
Normally, when a matching rule is encountered,
rule matching stops. When the continue key is
provided (with any value), matching continues at
the next rule.
\item[force-tags]
Like tags, but overrides any settings obtained
obtained from the client's group or from the
|_WMII_TAGS| window property.
\end{description}
When a client's name:class:title matches
regex, it is given the tagstring tag. There are
two special tags. |!|, which is deprecated, and identical
to |sel|, represents the current tag. |~|
represents the floating layer.
\end{description} \end{description}
\index{!filesystem!/|)} \index{!filesystem!/|)}
@ -1312,8 +1361,8 @@ For clarity, here is the end result:
# «Command Execution Initialization» # «Command Execution Initialization»
terminal() { wmiir setsid xterm “$@” } terminal() { wmiir setsid xterm “$@” }
proglist() { proglist() {
IFS=: set -- $1 IFS=:
find -L $@ -maxdepth 1 -perm /111 | sed 1d; s,.*/,, | sort | uniq wmiir proglist $1 | sort | uniq
unset IFS unset IFS
} }
@ -1448,7 +1497,7 @@ For clarity, here is the end result:
# «Client Command Keys» # «Client Command Keys»
Mod4-Shift-c) wmiir xwrite /client/sel/ctl kill;; Mod4-Shift-c) wmiir xwrite /client/sel/ctl kill;;
Mod4-f) wmiir xwrite /client/sel/ctl Fullscreen toggle;; Mod4-f) wmiir xwrite /client/sel/ctl fullscreen toggle;;
# «Command Execution Keys» # «Command Execution Keys»
Mod4-Return) terminal & ;; Mod4-Return) terminal & ;;
@ -1484,9 +1533,9 @@ For clarity, here is the end result:
# «Client Menu Events» # «Client Menu Events»
ClientMouseDown) # ClientMouseDown Client ID Button ClientMouseDown) # ClientMouseDown Client ID Button
[ $2 = 3 ] && clickmenu \ [ $2 = 3 ] && clickmenu \
“Delete:xwrite /client/$1/ctl kill” \ “Delete:wmiir xwrite /client/$1/ctl kill” \
“Kill:xwrite /client/$1/ctl slay” \ “Kill:wmiir xwrite /client/$1/ctl slay” \
“Fullscreen:/client/$1/ctl Fullscreen on” “Fullscreen:wmiir xwrite /client/$1/ctl fullscreen on”
# «Tag Menu Events» # «Tag Menu Events»
LeftBarMouseDown) # LeftBarMouseDown Button Bar Name LeftBarMouseDown) # LeftBarMouseDown Button Bar Name

View File

@ -20,7 +20,8 @@ LIBS9 = $(ROOT)/lib/libstuff.a $(ROOT)/lib/libregexp9.a $(ROOT)/lib/libbio.a $(R
CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"' \ CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"' \
'-DCONFDIR=\"$(CONFDIR)\"' '-DCONFPREFIX=\"$(ETC)\"' \ '-DCONFDIR=\"$(CONFDIR)\"' '-DCONFPREFIX=\"$(ETC)\"' \
'-DLOCALCONF=\"$(LOCALCONF)\"' '-DGLOBALCONF=\"$(GLOBALCONF)\"' '-DLOCALCONF=\"$(LOCALCONF)\"' '-DGLOBALCONF=\"$(GLOBALCONF)\"' \
-DIXP_NEEDAPI=127
FILTER = sed "s|@CONFPREFIX@|$(ETC)|g; \ FILTER = sed "s|@CONFPREFIX@|$(ETC)|g; \
s|@GLOBALCONF@|$(GLOBALCONF)|g; \ s|@GLOBALCONF@|$(GLOBALCONF)|g; \

View File

@ -27,7 +27,7 @@ echo LD "$($bin/cleanname ${BASE}$outfile)"
[ -n "$noisycc" ] && echo $LD -o $outfile $ofiles $LDFLAGS $args [ -n "$noisycc" ] && echo $LD -o $outfile $ofiles $LDFLAGS $args
$LD -o $outfile $ofiles $LDFLAGS $args >$xtmp 2>&1 $LD -o $outfile $ofiles $LDFLAGS $args >$xtmp 2>&1
status=$? status=$?
[ $status -eq 0 ] || $LD -o $outfile $ofiles $LDFLAGS $args >&2 [ $status -eq 0 ] || echo $LD -o $outfile $ofiles $LDFLAGS $args >&2
sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . | sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . |
egrep -v 'is almost always misused|is dangerous, better use|in statically linked applications requires at runtime' egrep -v 'is almost always misused|is dangerous, better use|in statically linked applications requires at runtime'