changeset: 2158:243ed0c354bd
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Jun 11 12:04:50 2007 -0400
summary: Updated wmii.1
diff -r 5976a81bca5a -r 243ed0c354bd cmd/wmii/message.c
--- a/cmd/wmii/message.c Sun Jun 10 23:49:15 2007 -0400
+++ b/cmd/wmii/message.c Mon Jun 11 12:04:50 2007 -0400
@@ -360,7 +360,7 @@ char *
char *
message_client(Client *c, Message *m) {
char *s;
-
+
s = getword(m);
switch(getsym(s)) {
@@ -519,11 +519,13 @@ select_frame(Frame *f, Message *m, int s
switch(sym) {
case LUP:
- for(fp = a->frame; fp; fp = fp->anext)
+ for(fp = a->frame; fp->anext; fp = fp->anext)
if(fp->anext == f) break;
break;
case LDOWN:
fp = f->anext;
+ if(fp == nil)
+ fp = a->frame;
break;
case LCLIENT:
s = getword(m);
diff -r 5976a81bca5a -r 243ed0c354bd man/wmii.1
--- a/man/wmii.1 Sun Jun 10 23:49:15 2007 -0400
+++ b/man/wmii.1 Mon Jun 11 12:04:50 2007 -0400
@@ -1,5 +1,5 @@
'\" t
-.\" Manual page created with latex2man on Fri May 25 01:36:45 EDT 2007
+.\" Manual page created with latex2man on Mon Jun 11 12:04:08 EDT 2007
.\" NOTE: This file is generated, DO NOT EDIT.
.de Vb
.ft CW
@@ -10,13 +10,11 @@
.fi
..
-.TH "WMII" "1" "25 May 2007" "" ""
+.TH "WMII" "1" "11 June 2007" "" ""
.SH NAME
-
wmii\-VERSION
.PP
.SH SYNOPSIS
-
wmii
[\fB\-a\fP\fI<address>\fP]
[\fB\-c\fP\fI<wmiirc>\fP]
@@ -25,7 +23,6 @@ wmii
\fB\-v\fP
.PP
.SH DESCRIPTION
-
.PP
.SS OVERVIEW
.PP
@@ -66,37 +63,37 @@ section.
.SS TERMINOLOGY
.PP
.TP
-Display
+Display
A running X server instance consisting of input devices
and screens.
.TP
-Screen
+Screen
A physical or virtual (Xinerama or \fIXnest\fP(1))
screen
of an X display. A screen displays a bar window and a view at a time.
.TP
-Window
+Window
A (rectangular) drawable X object which is displayed on a
screen, usually an application window.
.TP
-Client
+Client
An application window surrounded by a frame window containing
a border and a titlebar.
.TP
-Floating layer
+Floating layer
A screen layer of wmii
on top of all other
layers, where clients are arranged in a classic (floating) way.
They can be resized or moved freely.
.TP
-Managed layer
+Managed layer
A screen layer of wmii
behind the floating layer,
where clients are arranged in a nonoverlapping (managed) way. Here,
the window manager dynamically assigns each client a size and position.
The managed layer consists of columns.
.TP
-Tag
+Tag
Alphanumeric strings which can be assigned to a client. This provides
a mechanism to group clients with similar properties. Clients can have one
tag, e.g. \fIwork\fP,
@@ -105,22 +102,22 @@ Tags are separated with the \fI+\fP
Tags are separated with the \fI+\fP
character.
.TP
-View
+View
A set of clients containing a specific tag, quite similiar to a
workspace in other window managers. It consists of the floating and
managed layers.
.TP
-Column
+Column
A column is a screen area which arranges clients vertically in a
non\-overlapping way. Columns provide three different modes, which
arrange clients with equal size, stacked, or maximized respectively.
Clients can be moved and resized between and within columns freely.
.TP
-Bar
+Bar
The bar at the bottom of the screen displays a label for each view and
allows the creation of arbitrary userdefined labels.
.TP
-Event
+Event
An event is a message which can be read from a special file in the
filesystem of wmii,
such as a mouse button press, a key press, or
@@ -344,7 +341,6 @@ T}
.TE
.PP
.SH CONFIGURATION
-
.PP
If you feel the need to change the default configuration, then
customize (as described above) the wmiirc
@@ -354,24 +350,317 @@ the work of setting up the window manage
the work of setting up the window manager, the key bindings, the bar
labels, etc.
.PP
+.SH FILESYSTEM
+.PP
+Most aspects of wmii
+are controlled via the filesystem.
+It is usually accessed via the \fIwmiir\fP(1)
+command, but it
+can be accessed by any 9P
+client, including plan9port\&'s
+\fI9P\fP(1),
+and can be mounted natively on Linux via v9fs[1],
+and on Inferno (which man run on top of Linux).
+.PP
+The filesystem is, as are many other 9P filesystems, entirely
+synthetic. The files exist only in memory, and are not written
+to disk. They are generally initiated on wmii startup via a
+script such as rc.wmii or wmiirc. Several files read commands,
+others simply act as if they were ordinary files (their contents
+are updated and returned exactly as written), though writing
+them has side\-effects (such as changing key bindings). A
+description of the filesystem layout and control commands
+follows.
+.PP
+.SS Hierarchy
+.TP
+/
+Global control files
+.TP
+/client/\fI*\fP/
+Client control files
+.TP
+/tag/\fI*\fP/
+View control files
+.TP
+/lbar/, /rbar/
+Files representing the contents of the
+bottom bar
+.PP
+.SS The / Hierarchy
+.TP
+colrules
+The \fIcolrules\fP
+file contains a list of
+rules which affect the width of newly created columns.
+Rules have the form:
+.br
+\fB \fP
+.br
+\fB \fP\fB \fP/\fIregex\fP/
+\-> \fIwidth\fP[\fI+width\&...
+\fP]
+.br
+\fB \fP
+.br
+When a new column, \fIn\fP,
+is created on a view whose
+name matches \fIregex\fP,
+the \fIn\fPth
+given
+\fIwidth\fP
+percentage of the screen is given to it. If
+there is no \fIn\fPth
+width, 1/\fIncol\fPth
+of the
+screen is given to it.
+.TP
+tagrules
+The \fItagrules\fP
+file contains a list of
+rules similar to the colrules. These rules specify
+the tags a client is to be given when it is created.
+Rules are specified:
+.br
+\fB \fP
+.br
+\fB \fP\fB \fP/\fIregex\fP/
+\-> \fItag\fP[\fI+tag\&...
+\fP]
+.br
+\fB \fP
+.br
+When a client\&'s \fIname\fP:\fIclass\fP:\fItitle\fP
+matches \fIregex\fP,
+it is given the tagstring
+\fItag\fP\&.
+There are two special tags. \fI!\fP,
+which
+will be replaced with \fIsel\fP
+in the future,
+represents the current tag. \fI^\fP
+represents the
+floating layer.
+.TP
+keys
+The \fIkeys\fP
+file contains a list of keys which
+wmii
+will grab. Whenever these key combinations
+are pressed, the string which represents them are
+written to /event
+as: Key \fIstring\fP
+.TP
+event
+The \fIevent\fP
+file never returns EOF while
+wmii
+is running. It stays open and reports events
+as they occur. Included among them are:
+.RS
+.TP
+\fINot\fPUrgent \fIclient\fP \fIManager|Client\fP
+\fIclient\fP\&'s
+urgent hint has been set or
+unset. The second arg is \fIClient\fP
+if it\&'s
+been set by the client, and \fIManager\fP
+if
+it\&'s been set by wmii
+via a control
+message.
+.TP
+\fINot\fPUrgentTag \fItag\fP \fIManager|Client\fP
+A client on \fItag\fP
+has had its urgent hint
+set, or the last urgent client has had its
+urgent hint unset.
+.TP
+ClientClick|ClientMouseDown \fIclient\fP \fIbutton\fP
+A client\&'s titlebar has either been clicked or
+has a button pressed over it.
+.TP
+\fILeft|Right\fPBar\fIClick|MouseDown\fP \fIbutton\fP \fIbar\fP
+A left or right bar has been clicked or has a
+button pressed over it.
+.TP
+\&...To be continued\&...
+.RE
+.RS
+.PP
+.RE
+.TP
+ctl
+The \fIctl\fP
+file takes a number of messages to
+change global settings such as color and font, which can
+be viewed by reading it. It also takes the following
+commands:
+.RS
+.TP
+quit
+Quit wmii
+.TP
+exec \fIprog\fP
+Replace wmii
+with
+\fIprog\fP
+.RE
+.RS
+.PP
+.RE
+.PP
+.SS The /client/ Hierarchy
+.PP
+Each directory under /client/
+represents an X11 client.
+Each directory is named for the X window id of the window the
+client represents, in the form that most X utilities recognize.
+The one exception is the special sel
+directory, which
+represents the currently selected client.
+.PP
+.RE
+.TP
+ctl
+When read, the ctl
+file returns the X window id
+of the client. The following commands may be written to
+it:
+.RS
+.TP
+kill
+Close the client\&'s window. This command will
+likely kill the X client in the future
+(including its other windows), while the close
+command will replace it.
+.TP
+\fINot\fPUrgent
+Set or unset the client\&'s urgent
+hint.
+.TP
+\fINot\fPFullscreen
+.RS
+.PP
+.RE
+.RE
+.PP
+.RE
+.TP
+label
+Set or read a client\&'s label (title).
+.TP
+props
+Returns a clients class and label as:
+\fIname\fP:\fIclass\fP:\fIlabel\fP
+.TP
+tags
+Set or read a client\&'s tags. Tags are seperated by
+\fI+\fP
+or {\-}. Tags begining with \fI+\fP
+are added,
+while those begining with \fI\-\fP
+are removed. If the
+tag string written begins with \fI+\fP
+or \fI\-\fP,
+the
+written tags are added to or removed from the client\&'s
+set, otherwise, the set is overwritten.
+.PP
+.SS The /tag/ Hierarchy
+.PP
+Each directory under /tag/
+represents a view, containing
+all of the clients with the given tag applied. The special
+sel
+directory represents the currently selected tag.
+.PP
+.TP
+ctl
+The ctl
+file can be read to retrieve the name
+of the tag the directory represents, or written with the
+following commands:
+.RS
+.TP
+select
+Select a client:
+.br
+\fB \fP\fB \fPselect \fIleft|right|up|down\fP
+.br
+\fB \fP\fB \fPselect \fIrow number|sel\fP
+[\fIframe number\fP]
+.br
+\fB \fP\fB \fPselect client \fIclient\fP
+.TP
+send
+Send a client somewhere:
+.RS
+.TP
+send \fIclient|sel\fP \fIup|down|left|right\fP
+.TP
+send \fIclient|sel\fP \fIarea\fP
+Send
+\fIclient\fP
+to the nth \fIarea\fP
+.TP
+send \fIclient|sel\fP toggle
+Toggle
+\fIclient\fP
+between the floating and
+managed layer.
+.RE
+.RS
+.PP
+.RE
+.TP
+swap
+Swap a client with another. Same syntax as
+send.
+.RE
+.RS
+.PP
+.RE
+.TP
+index
+Read for a description of the contents of a tag.
+.PP
+.SS The /rbar/, /lbar/ Hierarchy
+.PP
+The files under /rbar/
+and /lbar/
+represent the
+items of the bar at the bottom of the screen. Files under
+/lbar/
+appear on the left side of the bar, while those
+under /rbar/
+appear on the right, with the leftmost item
+occupying all extra available space. The items are sorted
+lexicographically.
+.PP
+The files may be read to obtain the colors and text of the bars.
+The colors are at the begining of the string, represented as a
+tuple of 3 hex color codes for the foreground, background, and
+border, respectively. When writing the bar files, the colors may
+be omitted if the text would not otherwise appear to contain
+them.
+.PP
.SH FILES
-
-.PP
-.TP
-/tmp/ns.USER.{DISPLAY%\&.0}/wmii
+.PP
+.TP
+/tmp/ns.USER.{DISPLAY%\&.0}/wmii
The wmii socket file which provides a 9P service.
.TP
-CONFPREFIX/wmii\-3.5
+CONFPREFIX/wmii\-3.5
Global action directory.
.TP
-$HOME/.wmii\-3.5
+$HOME/.wmii\-3.5
User\-specific action directory. Actions are first searched here.
.PP
.SH ENVIRONMENT
-
-.PP
-.TP
-HOME, DISPLAY
+.PP
+.TP
+HOME, DISPLAY
See the section \fBFILES\fP
above.
.PP
@@ -380,12 +669,13 @@ thus can be used in actions:
thus can be used in actions:
.PP
.TP
-WMII_ADDRESS
+WMII_ADDRESS
Socket file of Used by \fIwmiir\fP(1)\&.
.PP
.SH SEE ALSO
-
\fIdmenu\fP(1),
\fIwmiir\fP(1)
.PP
+[1] http://www.suckless.org/wiki/wmii/tips/9p_tips
+.PP
.\" NOTE: This file is generated, DO NOT EDIT.
diff -r 5976a81bca5a -r 243ed0c354bd man/wmii.tex
--- a/man/wmii.tex Sun Jun 10 23:49:15 2007 -0400
+++ b/man/wmii.tex Mon Jun 11 12:04:50 2007 -0400
@@ -163,6 +163,175 @@ the work of setting up the window manage
the work of setting up the window manager, the key bindings, the bar
labels, etc.
+\section{Filesystem}
+
+Most aspects of \Prog{wmii} are controlled via the filesystem.
+It is usually accessed via the \Cmd{wmiir}{1} command, but it
+can be accessed by any \texttt{9P} client, including plan9port's
+\Cmd{9P}{1}, and can be mounted natively on Linux via v9fs[1],
+and on Inferno (which man run on top of Linux).
+
+The filesystem is, as are many other 9P filesystems, entirely
+synthetic. The files exist only in memory, and are not written
+to disk. They are generally initiated on wmii startup via a
+script such as rc.wmii or wmiirc. Several files read commands,
+others simply act as if they were ordinary files (their contents
+are updated and returned exactly as written), though writing
+them has side-effects (such as changing key bindings). A
+description of the filesystem layout and control commands
+follows.
+
+\subsubsection{Hierarchy}
+\begin{description}
+\item[/] Global control files
+\item[/client/\emph{*}/] Client control files
+\item[/tag/\emph{*}/] View control files
+\item[/lbar/, /rbar/] Files representing the contents of the
+ bottom bar
+\end{description}
+
+\subsubsection{The / Hierarchy}
+\begin{description}
+\item[colrules] The \emph{colrules} file contains a list of
+ rules which affect the width of newly created columns.
+ Rules have the form: \\ \SP % Yuck!
+ \MANbr
+ \SP\SP /\Arg{regex}/ -> \Arg{width}\oArg{+width\Dots} \\ \SP
+ \MANbr
+ When a new column, \Arg{n}, is created on a view whose
+ name matches \Arg{regex}, the \Arg{n}th given
+ \Arg{width} percentage of the screen is given to it. If
+ there is no \Arg{n}th width, 1/\emph{ncol}th of the
+ screen is given to it.
+\item[tagrules] The \emph{tagrules} file contains a list of
+ rules similar to the colrules. These rules specify
+ the tags a client is to be given when it is created.
+ Rules are specified: \\ \SP
+ \MANbr
+ \SP\SP /\Arg{regex}/ -> \Arg{tag}\oArg{+tag\Dots} \\ \SP
+ \MANbr
+ When a client's \Arg{name}:\Arg{class}:\Arg{title}
+ matches \Arg{regex}, it is given the tagstring
+ \Arg{tag}. There are two special tags. \emph{!}, which
+ will be replaced with \emph{sel} in the future,
+ represents the current tag. \emph{\Circum} represents the
+ floating layer.
+\item[keys] The \emph{keys} file contains a list of keys which
+ \Prog{wmii} will grab. Whenever these key combinations
+ are pressed, the string which represents them are
+ written to \File{/event} as: Key \Arg{string}
+\item[event] The \emph{event} file never returns EOF while
+ \Prog{wmii} is running. It stays open and reports events
+ as they occur. Included among them are:
+ \begin{description}
+ \item[\emph{Not}Urgent \Arg{client} \Arg{Manager\Bar Client}]
+ \Arg{client}'s urgent hint has been set or
+ unset. The second arg is \emph{Client} if it's
+ been set by the client, and \emph{Manager} if
+ it's been set by \Prog{wmii} via a control
+ message.
+ \item[\emph{Not}UrgentTag \Arg{tag} \Arg{Manager\Bar Client}]
+ A client on \Arg{tag} has had its urgent hint
+ set, or the last urgent client has had its
+ urgent hint unset.
+ \item[ClientClick\Bar ClientMouseDown \Arg{client} \Arg{button}]
+ A client's titlebar has either been clicked or
+ has a button pressed over it.
+ \item[\emph{Left\Bar Right}Bar\emph{Click\Bar MouseDown} \Arg{button} \Arg{bar}]
+ A left or right bar has been clicked or has a
+ button pressed over it.
+ \item[\Dots] To be continued\Dots
+ \end{description}
+\item[ctl] The \emph{ctl} file takes a number of messages to
+ change global settings such as color and font, which can
+ be viewed by reading it. It also takes the following
+ commands:
+ \begin{description}
+ \item[quit] Quit \Prog{wmii}
+ \item[exec \Arg{prog}] Replace \Prog{wmii} with
+ \emph{prog}
+ \end{description}
+\end{description}
+
+\subsubsection{The /client/ Hierarchy}
+
+Each directory under \File{/client/} represents an X11 client.
+Each directory is named for the X window id of the window the
+client represents, in the form that most X utilities recognize.
+The one exception is the special \File{sel} directory, which
+represents the currently selected client.
+
+\begin{description}
+\item[ctl] When read, the \File{ctl} file returns the X window id
+ of the client. The following commands may be written to
+ it:
+ \begin{description}
+ \item[kill] Close the client's window. This command will
+ likely kill the X client in the future
+ (including its other windows), while the close
+ command will replace it.
+ \item[\Arg{Not}Urgent] Set or unset the client's urgent
+ hint.
+ \item[\Arg{Not}Fullscreen]
+
+ \end{description}
+\item[label] Set or read a client's label (title).
+\item[props] Returns a clients class and label as:
+ \emph{name}:\emph{class}:\emph{label}
+\item[tags] Set or read a client's tags. Tags are seperated by
+ \emph{+} or {-}. Tags begining with \emph{+} are added,
+ while those begining with \emph{-} are removed. If the
+ tag string written begins with \emph{+} or \emph{-}, the
+ written tags are added to or removed from the client's
+ set, otherwise, the set is overwritten.
+\end{description}
+
+\subsubsection{The /tag/ Hierarchy}
+
+Each directory under \File{/tag/} represents a view, containing
+all of the clients with the given tag applied. The special
+\File{sel} directory represents the currently selected tag.
+
+\begin{description}
+\item[ctl] The \File{ctl} file can be read to retrieve the name
+ of the tag the directory represents, or written with the
+ following commands:
+ \begin{description}
+ \item[select] Select a client: \\
+ \SP\SP select \Arg{left\Bar right\Bar up\Bar down} \\
+ \SP\SP select \Arg{row number\Bar sel} \oArg{frame number} \\
+ \SP\SP select client \Arg{client}
+ \item[send] Send a client somewhere:
+ \begin{description}
+ \item[send \Arg{client|sel} \Arg{up|down|left|right}]
+ \item[send \Arg{client|sel} \Arg{area}] Send
+ \Arg{client} to the nth \Arg{area}
+ \item[send \Arg{client|sel} toggle] Toggle
+ \Arg{client} between the floating and
+ managed layer.
+ \end{description}
+ \item[swap] Swap a client with another. Same syntax as
+ send.
+ \end{description}
+\item[index] Read for a description of the contents of a tag.
+\end{description}
+
+\subsubsection{The /rbar/, /lbar/ Hierarchy}
+
+The files under \File{/rbar/} and \File{/lbar/} represent the
+items of the bar at the bottom of the screen. Files under
+\File{/lbar/} appear on the left side of the bar, while those
+under \File{/rbar/} appear on the right, with the leftmost item
+occupying all extra available space. The items are sorted
+lexicographically.
+
+The files may be read to obtain the colors and text of the bars.
+The colors are at the begining of the string, represented as a
+tuple of 3 hex color codes for the foreground, background, and
+border, respectively. When writing the bar files, the colors may
+be omitted if the text would not otherwise appear to contain
+them.
+
\section{FILES}
\begin{description}
@@ -187,3 +356,5 @@ thus can be used in actions:
\section{SEE ALSO}
\Cmd{dmenu}{1}, \Cmd{wmiir}{1}
+[1] http://www.suckless.org/wiki/wmii/tips/9p\_tips
+
Received on Mon Jun 11 2007 - 18:05:44 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:18 UTC