wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 878d02cf53b66f981eb6e46129bce847c096f604
parent 692dcce6235ec6359357be7c5c24fd01b37a078b
Author: Kris Maglione <jg@suckless.org>
Date:   Wed, 15 Oct 2008 16:08:56 -0400

Document grow/nudge commands.

Diffstat:
cmd/menu/main.c | 5+++--
cmd/menu/menu.c | 63+++++++++++++++++++++++++++++++++------------------------------
man/mkfile | 2+-
man/wmii.1 | 56++++++++++++++++++++++++++++++++++++++++++++++++++------
man/wmii.tex | 29++++++++++++++++++++++++++---
man/wmiiloop.1 | 9+++------
6 files changed, 116 insertions(+), 48 deletions(-)

diff --git a/cmd/menu/main.c b/cmd/menu/main.c @@ -262,6 +262,9 @@ main(int argc, char *argv[]) { 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 @@ main(int argc, char *argv[]) { Bterm(inbuf); } - xext_init(); - menu_init(); init_screens(); i = ixp_serverloop(&srv); diff --git a/cmd/menu/menu.c b/cmd/menu/menu.c @@ -223,7 +223,10 @@ menu_show(void) { mapwin(barwin); raisewin(barwin); menu_draw(); - grabkeyboard(barwin); + if(!grabkeyboard(barwin)) { + srv.running = false; + result = 1; + } } static void @@ -241,13 +244,12 @@ kdown_event(Window *w, XKeyEvent *e) { ksym = (ksym - XK_KP_0) + XK_0; if(IsFunctionKey(ksym) - || IsKeypadKey(ksym) || IsMiscFunctionKey(ksym) - || IsPFKey(ksym) + || IsKeypadKey(ksym) || IsPrivateKeypadKey(ksym)) + || IsPFKey(ksym) return; - /* first check if a control mask is omitted */ if(e->state & ControlMask) { switch (ksym) { default: @@ -269,13 +271,6 @@ kdown_event(Window *w, XKeyEvent *e) { 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); @@ -289,6 +284,13 @@ kdown_event(Window *w, XKeyEvent *e) { 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; } } /* Alt-<Key> - Vim */ @@ -302,12 +304,12 @@ kdown_event(Window *w, XKeyEvent *e) { case XK_l: menu_cmd(CMPL_NEXT, 0); return; - case XK_j: - menu_cmd(CMPL_NEXT_PAGE, 0); - return; case XK_k: menu_cmd(CMPL_PREV_PAGE, 0); return; + case XK_j: + menu_cmd(CMPL_NEXT_PAGE, 0); + return; case XK_g: menu_cmd(CMPL_FIRST, 0); return; @@ -324,15 +326,27 @@ kdown_event(Window *w, XKeyEvent *e) { menu_draw(); } break; - case XK_Escape: - menu_cmd(REJECT, 0); + 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); + menu_cmd(ACCEPT, e->state & ShiftMask); + return; + case XK_Escape: + menu_cmd(REJECT, 0); 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); return; @@ -340,27 +354,16 @@ kdown_event(Window *w, XKeyEvent *e) { 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 --git a/man/mkfile b/man/mkfile @@ -1,4 +1,4 @@ -TARG = `{make -VTARG} +TARG = `{bmake -VTARG} default:V: all diff --git a/man/wmii.1 b/man/wmii.1 @@ -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 @@ following commands: 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 @@ managed layer. 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 --git a/man/wmii.tex b/man/wmii.tex @@ -305,9 +305,8 @@ all of the clients with the given tag applied. The special 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 @@ all of the clients with the given tag applied. The special \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 --git a/man/wmiiloop.1 b/man/wmiiloop.1 @@ -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 @@ Mod1_j() { .Ve .PP .SH SEE ALSO - \fIwmii\fP(1), \fIwmii\fP(1)\&. \fIwmiir\fP(1),