[hackers] [wmii] Document grow/nudge commands. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Wed, 15 Oct 2008 20:09:02 +0000 (UTC)

changeset: 2369:361ab709dd0e
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Oct 15 16:08:56 2008 -0400
files: cmd/menu/main.c cmd/menu/menu.c man/mkfile man/wmii.1 man/wmii.tex man/wmiiloop.1
description:
Document grow/nudge commands.

diff -r efd09c52fc58 -r 361ab709dd0e cmd/menu/main.c
--- a/cmd/menu/main.c Tue Oct 14 19:08:13 2008 -0400
+++ b/cmd/menu/main.c Wed Oct 15 16:08:56 2008 -0400
@@ -262,6 +262,9 @@
         if(!font)
                 fatal("Can't load font %q", readctl("font "));
 
+ xext_init();
+ menu_init();
+
         inbuf = Bfdopen(0, OREAD);
         items = populate_list(inbuf, false);
         caret_insert("", true);
@@ -281,8 +284,6 @@
                 Bterm(inbuf);
         }
 
- xext_init();
- menu_init();
         init_screens();
 
         i = ixp_serverloop(&srv);
diff -r efd09c52fc58 -r 361ab709dd0e cmd/menu/menu.c
--- a/cmd/menu/menu.c Tue Oct 14 19:08:13 2008 -0400
+++ b/cmd/menu/menu.c Wed Oct 15 16:08:56 2008 -0400
@@ -223,7 +223,10 @@
         mapwin(barwin);
         raisewin(barwin);
         menu_draw();
- grabkeyboard(barwin);
+ if(!grabkeyboard(barwin)) {
+ srv.running = false;
+ result = 1;
+ }
 }
 
 static void
@@ -241,13 +244,12 @@
                         ksym = (ksym - XK_KP_0) + XK_0;
 
         if(IsFunctionKey(ksym)
+ || IsMiscFunctionKey(ksym)
         || IsKeypadKey(ksym)
- || IsMiscFunctionKey(ksym)
+ || IsPrivateKeypadKey(ksym))
         || IsPFKey(ksym)
- || IsPrivateKeypadKey(ksym))
                 return;
 
- /* first check if a control mask is omitted */
         if(e->state & ControlMask) {
                 switch (ksym) {
                 default:
@@ -269,13 +271,6 @@
                 case XK_P:
                         menu_cmd(HIST_PREV, 0);
                         return;
- case XK_i: /* Tab */
- case XK_I:
- if(e->state & ShiftMask)
- menu_cmd(CMPL_PREV, 0);
- else
- menu_cmd(CMPL_NEXT, 0);
- return;
                 case XK_h:
                 case XK_H:
                         menu_cmd(KILL, CHAR);
@@ -288,6 +283,13 @@
                 case XK_u:
                 case XK_U:
                         menu_cmd(KILL, LINE);
+ return;
+ case XK_i: /* Tab */
+ case XK_I:
+ if(e->state & ShiftMask)
+ menu_cmd(CMPL_PREV, 0);
+ else
+ menu_cmd(CMPL_NEXT, 0);
                         return;
                 }
         }
@@ -302,11 +304,11 @@
                 case XK_l:
                         menu_cmd(CMPL_NEXT, 0);
                         return;
+ case XK_k:
+ menu_cmd(CMPL_PREV_PAGE, 0);
+ return;
                 case XK_j:
                         menu_cmd(CMPL_NEXT_PAGE, 0);
- return;
- case XK_k:
- menu_cmd(CMPL_PREV_PAGE, 0);
                         return;
                 case XK_g:
                         menu_cmd(CMPL_FIRST, 0);
@@ -324,14 +326,26 @@
                         menu_draw();
                 }
                 break;
+ case XK_Tab:
+ if(e->state & ShiftMask)
+ menu_cmd(CMPL_PREV, 0);
+ else
+ menu_cmd(CMPL_NEXT, 0);
+ return;
+ case XK_Return:
+ menu_cmd(ACCEPT, e->state & ShiftMask);
+ return;
         case XK_Escape:
                 menu_cmd(REJECT, 0);
                 return;
- case XK_Return:
- menu_cmd(ACCEPT, e->state&ShiftMask);
- return;
         case XK_BackSpace:
                 menu_cmd(KILL, CHAR);
+ return;
+ case XK_Left:
+ menu_cmd(BACKWARD, CHAR);
+ return;
+ case XK_Right:
+ menu_cmd(FORWARD, CHAR);
                 return;
         case XK_Up:
                 menu_cmd(HIST_PREV, 0);
@@ -340,27 +354,16 @@
                 menu_cmd(HIST_NEXT, 0);
                 return;
         case XK_Home:
- /* TODO: Caret. */
                 menu_cmd(CMPL_FIRST, 0);
                 return;
         case XK_End:
- /* TODO: Caret. */
                 menu_cmd(CMPL_LAST, 0);
- return;
- case XK_Left:
- menu_cmd(BACKWARD, CHAR);
- return;
- case XK_Right:
- menu_cmd(FORWARD, CHAR);
- return;
- case XK_Next:
- menu_cmd(CMPL_NEXT_PAGE, 0);
                 return;
         case XK_Prior:
                 menu_cmd(CMPL_PREV_PAGE, 0);
                 return;
- case XK_Tab:
- menu_cmd(CMPL_NEXT, 0);
+ case XK_Next:
+ menu_cmd(CMPL_NEXT_PAGE, 0);
                 return;
         }
 }
diff -r efd09c52fc58 -r 361ab709dd0e man/mkfile
--- a/man/mkfile Tue Oct 14 19:08:13 2008 -0400
+++ b/man/mkfile Wed Oct 15 16:08:56 2008 -0400
@@ -1,4 +1,4 @@
-TARG = `{make -VTARG}
+TARG = `{bmake -VTARG}
 
 default:V: all
 
diff -r efd09c52fc58 -r 361ab709dd0e man/wmii.1
--- a/man/wmii.1 Tue Oct 14 19:08:13 2008 -0400
+++ b/man/wmii.1 Wed Oct 15 16:08:56 2008 -0400
@@ -1,5 +1,5 @@
 '\" t
-.\" Manual page created with latex2man on Tue Jul 3 10:15:50 EDT 2007
+.\" Manual page created with latex2man on Wed Oct 15 16:08:29 EDT 2008
 .\" NOTE: This file is generated, DO NOT EDIT.
 .de Vb
 .ft CW
@@ -10,7 +10,8 @@
 
 .fi
 ..
-.TH "WMII" "1" "03 July 2007" "" ""
+.TH "WMII" "1" " Wed Dec 31 19:00:00 EDT 1969
+" "" ""
 .SH NAME
 wmii\-VERSION
 .PP
@@ -592,12 +593,10 @@
 select
 Select a client:
 .br
-\fB \fP\fB \fPselect \fIleft|right|up|down\fP
+\fB \fP\fB \fPselect \fIdirection\fP
 .br
-\fB \fP\fB \fPselect \fIrow number|sel\fP
-[\fIframe number\fP]
+\fB \fP\fB \fPselect \fIframe\fP
 .br
-\fB \fP\fB \fPselect client \fIclient\fP
 .TP
 send
 Send a client somewhere:
@@ -623,6 +622,51 @@
 swap
 Swap a client with another. Same syntax as
 send.
+.TP
+grow
+Grow or shrink a client.
+\fB \fP\fB \fPgrow \fI<frame>\fP
+\fI<direction>\fP
+\fI[amount]\fP
+.TP
+nudge
+Nudge a client in a given direction.
+\fB \fP\fB \fPgrow \fI<frame>\fP
+\fI<direction>\fP
+\fI[amount]\fP
+.RE
+.RS
+.PP
+Where the arguments are defined as follows:
+.RS
+.RE
+.TP
+area
+Selects a column or the floating area.
+.br
+\fB \fP\fB \fParea ::= "~"\fB \fP| <number> | "sel"
+.br
+Where represents the floating area and <number>
+represents a column index, starting at one.
+.TP
+frame
+Selects a client window.
+.br
+\fB \fP\fB \fPframe ::= <area> <space> <index> | <area> "sel" | client <window\-id>
+.br
+Where <index> represents the nth frame of <area> or
+<window\-id> is the X11 window id of the given client.
+.TP
+amount
+The amount to grow or nudge something.
+.br
+\fB \fP\fB \fPamount ::= <number> "px"?
+.br
+If "px" is given, <number> is interperated as an exact
+pixel count. Otherwise, it\&'s interperated as a "reasonable"
+amount, which is usually either the height of a window\&'s title
+bar, or its sizing increment (as defined by X11) in a given
+direction.
 .RE
 .RS
 .PP
diff -r efd09c52fc58 -r 361ab709dd0e man/wmii.tex
--- a/man/wmii.tex Tue Oct 14 19:08:13 2008 -0400
+++ b/man/wmii.tex Wed Oct 15 16:08:56 2008 -0400
@@ -305,9 +305,8 @@
         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}
+ \SP\SP select \Arg{direction} \\
+ \SP\SP select \Arg{frame} \\
         \item[send] Send a client somewhere:
                 \begin{description}
                 \item[send \Arg{client|sel} \Arg{up|down|left|right}]
@@ -319,7 +318,31 @@
                 \end{description}
         \item[swap] Swap a client with another. Same syntax as
                 send.
+ \item[grow] Grow or shrink a client.
+ \SP\SP grow \Arg{<frame>} \Arg{<direction>} \Arg{[amount]}
+ \item[nudge] Nudge a client in a given direction.
+ \SP\SP grow \Arg{<frame>} \Arg{<direction>} \Arg{[amount]}
         \end{description}
+
+ Where the arguments are defined as follows:
+ \begin{description}
+ \item[area] Selects a column or the floating area. \\
+ \SP\SP area ::= "\Tilde"\SP | <number> | "sel" \\
+ Where ~ represents the floating area and <number>
+ represents a column index, starting at one.
+ \item[frame] Selects a client window. \\
+ \SP\SP frame ::= <area> <space> <index> | <area> "sel" | client <window-id> \\
+ Where <index> represents the nth frame of <area> or
+ <window-id> is the X11 window id of the given client.
+ \item[amount] The amount to grow or nudge something. \\
+ \SP\SP amount ::= <number> "px"? \\
+ If "px" is given, <number> is interperated as an exact
+ pixel count. Otherwise, it's interperated as a "reasonable"
+ amount, which is usually either the height of a window's title
+ bar, or its sizing increment (as defined by X11) in a given
+ direction.
+ \end{description}
+
 \item[index] Read for a description of the contents of a tag.
 \end{description}
 
diff -r efd09c52fc58 -r 361ab709dd0e man/wmiiloop.1
--- a/man/wmiiloop.1 Tue Oct 14 19:08:13 2008 -0400
+++ b/man/wmiiloop.1 Wed Oct 15 16:08:56 2008 -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 Wed Oct 15 16:04:52 EDT 2008
 .\" NOTE: This file is generated, DO NOT EDIT.
 .de Vb
 .ft CW
@@ -10,19 +10,17 @@
 
 .fi
 ..
-.TH "WMIILOOP" "1" "25 May 2007" "" ""
+.TH "WMIILOOP" "1" " Wed Dec 31 19:00:00 EDT 1969
+" "" ""
 .SH NAME
-
 wmiiloop\-VERSION
 .PP
 .SH SYNOPSIS
-
 eval
 "$(wmiiloop
 <events)"
 .PP
 .SH DESCRIPTION
-
 .PP
 wmiiloop
 is an awk and sh script which preprocesses \fIsh\fP(1)
@@ -66,7 +64,6 @@
 .Ve
 .PP
 .SH SEE ALSO
-
 \fIwmii\fP(1),
 \fIwmii\fP(1)\&.
 \fIwmiir\fP(1),
Received on Wed Oct 15 2008 - 20:09:02 UTC

This archive was generated by hypermail 2.2.0 : Wed Oct 15 2008 - 20:12:06 UTC