mirror of https://github.com/0intro/wmii
Document grow/nudge commands.
This commit is contained in:
parent
692dcce623
commit
878d02cf53
|
@ -262,6 +262,9 @@ main(int argc, char *argv[]) {
|
||||||
if(!font)
|
if(!font)
|
||||||
fatal("Can't load font %q", readctl("font "));
|
fatal("Can't load font %q", readctl("font "));
|
||||||
|
|
||||||
|
xext_init();
|
||||||
|
menu_init();
|
||||||
|
|
||||||
inbuf = Bfdopen(0, OREAD);
|
inbuf = Bfdopen(0, OREAD);
|
||||||
items = populate_list(inbuf, false);
|
items = populate_list(inbuf, false);
|
||||||
caret_insert("", true);
|
caret_insert("", true);
|
||||||
|
@ -281,8 +284,6 @@ main(int argc, char *argv[]) {
|
||||||
Bterm(inbuf);
|
Bterm(inbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
xext_init();
|
|
||||||
menu_init();
|
|
||||||
init_screens();
|
init_screens();
|
||||||
|
|
||||||
i = ixp_serverloop(&srv);
|
i = ixp_serverloop(&srv);
|
||||||
|
|
|
@ -223,7 +223,10 @@ menu_show(void) {
|
||||||
mapwin(barwin);
|
mapwin(barwin);
|
||||||
raisewin(barwin);
|
raisewin(barwin);
|
||||||
menu_draw();
|
menu_draw();
|
||||||
grabkeyboard(barwin);
|
if(!grabkeyboard(barwin)) {
|
||||||
|
srv.running = false;
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -241,13 +244,12 @@ kdown_event(Window *w, XKeyEvent *e) {
|
||||||
ksym = (ksym - XK_KP_0) + XK_0;
|
ksym = (ksym - XK_KP_0) + XK_0;
|
||||||
|
|
||||||
if(IsFunctionKey(ksym)
|
if(IsFunctionKey(ksym)
|
||||||
|| IsKeypadKey(ksym)
|
|
||||||
|| IsMiscFunctionKey(ksym)
|
|| IsMiscFunctionKey(ksym)
|
||||||
|| IsPFKey(ksym)
|
|| IsKeypadKey(ksym)
|
||||||
|| IsPrivateKeypadKey(ksym))
|
|| IsPrivateKeypadKey(ksym))
|
||||||
|
|| IsPFKey(ksym)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* first check if a control mask is omitted */
|
|
||||||
if(e->state & ControlMask) {
|
if(e->state & ControlMask) {
|
||||||
switch (ksym) {
|
switch (ksym) {
|
||||||
default:
|
default:
|
||||||
|
@ -269,13 +271,6 @@ kdown_event(Window *w, XKeyEvent *e) {
|
||||||
case XK_P:
|
case XK_P:
|
||||||
menu_cmd(HIST_PREV, 0);
|
menu_cmd(HIST_PREV, 0);
|
||||||
return;
|
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:
|
||||||
case XK_H:
|
case XK_H:
|
||||||
menu_cmd(KILL, CHAR);
|
menu_cmd(KILL, CHAR);
|
||||||
|
@ -289,6 +284,13 @@ kdown_event(Window *w, XKeyEvent *e) {
|
||||||
case XK_U:
|
case XK_U:
|
||||||
menu_cmd(KILL, LINE);
|
menu_cmd(KILL, LINE);
|
||||||
return;
|
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 */
|
/* Alt-<Key> - Vim */
|
||||||
|
@ -302,12 +304,12 @@ kdown_event(Window *w, XKeyEvent *e) {
|
||||||
case XK_l:
|
case XK_l:
|
||||||
menu_cmd(CMPL_NEXT, 0);
|
menu_cmd(CMPL_NEXT, 0);
|
||||||
return;
|
return;
|
||||||
case XK_j:
|
|
||||||
menu_cmd(CMPL_NEXT_PAGE, 0);
|
|
||||||
return;
|
|
||||||
case XK_k:
|
case XK_k:
|
||||||
menu_cmd(CMPL_PREV_PAGE, 0);
|
menu_cmd(CMPL_PREV_PAGE, 0);
|
||||||
return;
|
return;
|
||||||
|
case XK_j:
|
||||||
|
menu_cmd(CMPL_NEXT_PAGE, 0);
|
||||||
|
return;
|
||||||
case XK_g:
|
case XK_g:
|
||||||
menu_cmd(CMPL_FIRST, 0);
|
menu_cmd(CMPL_FIRST, 0);
|
||||||
return;
|
return;
|
||||||
|
@ -324,15 +326,27 @@ kdown_event(Window *w, XKeyEvent *e) {
|
||||||
menu_draw();
|
menu_draw();
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case XK_Escape:
|
||||||
menu_cmd(REJECT, 0);
|
menu_cmd(REJECT, 0);
|
||||||
return;
|
return;
|
||||||
case XK_Return:
|
|
||||||
menu_cmd(ACCEPT, e->state&ShiftMask);
|
|
||||||
return;
|
|
||||||
case XK_BackSpace:
|
case XK_BackSpace:
|
||||||
menu_cmd(KILL, CHAR);
|
menu_cmd(KILL, CHAR);
|
||||||
return;
|
return;
|
||||||
|
case XK_Left:
|
||||||
|
menu_cmd(BACKWARD, CHAR);
|
||||||
|
return;
|
||||||
|
case XK_Right:
|
||||||
|
menu_cmd(FORWARD, CHAR);
|
||||||
|
return;
|
||||||
case XK_Up:
|
case XK_Up:
|
||||||
menu_cmd(HIST_PREV, 0);
|
menu_cmd(HIST_PREV, 0);
|
||||||
return;
|
return;
|
||||||
|
@ -340,27 +354,16 @@ kdown_event(Window *w, XKeyEvent *e) {
|
||||||
menu_cmd(HIST_NEXT, 0);
|
menu_cmd(HIST_NEXT, 0);
|
||||||
return;
|
return;
|
||||||
case XK_Home:
|
case XK_Home:
|
||||||
/* TODO: Caret. */
|
|
||||||
menu_cmd(CMPL_FIRST, 0);
|
menu_cmd(CMPL_FIRST, 0);
|
||||||
return;
|
return;
|
||||||
case XK_End:
|
case XK_End:
|
||||||
/* TODO: Caret. */
|
|
||||||
menu_cmd(CMPL_LAST, 0);
|
menu_cmd(CMPL_LAST, 0);
|
||||||
return;
|
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:
|
case XK_Prior:
|
||||||
menu_cmd(CMPL_PREV_PAGE, 0);
|
menu_cmd(CMPL_PREV_PAGE, 0);
|
||||||
return;
|
return;
|
||||||
case XK_Tab:
|
case XK_Next:
|
||||||
menu_cmd(CMPL_NEXT, 0);
|
menu_cmd(CMPL_NEXT_PAGE, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
TARG = `{make -VTARG}
|
TARG = `{bmake -VTARG}
|
||||||
|
|
||||||
default:V: all
|
default:V: all
|
||||||
|
|
||||||
|
|
56
man/wmii.1
56
man/wmii.1
|
@ -1,5 +1,5 @@
|
||||||
'\" t
|
'\" 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.
|
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||||
.de Vb
|
.de Vb
|
||||||
.ft CW
|
.ft CW
|
||||||
|
@ -10,7 +10,8 @@
|
||||||
|
|
||||||
.fi
|
.fi
|
||||||
..
|
..
|
||||||
.TH "WMII" "1" "03 July 2007" "" ""
|
.TH "WMII" "1" " Wed Dec 31 19:00:00 EDT 1969
|
||||||
|
" "" ""
|
||||||
.SH NAME
|
.SH NAME
|
||||||
wmii\-VERSION
|
wmii\-VERSION
|
||||||
.PP
|
.PP
|
||||||
|
@ -592,12 +593,10 @@ following commands:
|
||||||
select
|
select
|
||||||
Select a client:
|
Select a client:
|
||||||
.br
|
.br
|
||||||
\fB \fP\fB \fPselect \fIleft|right|up|down\fP
|
\fB \fP\fB \fPselect \fIdirection\fP
|
||||||
.br
|
.br
|
||||||
\fB \fP\fB \fPselect \fIrow number|sel\fP
|
\fB \fP\fB \fPselect \fIframe\fP
|
||||||
[\fIframe number\fP]
|
|
||||||
.br
|
.br
|
||||||
\fB \fP\fB \fPselect client \fIclient\fP
|
|
||||||
.TP
|
.TP
|
||||||
send
|
send
|
||||||
Send a client somewhere:
|
Send a client somewhere:
|
||||||
|
@ -623,6 +622,51 @@ managed layer.
|
||||||
swap
|
swap
|
||||||
Swap a client with another. Same syntax as
|
Swap a client with another. Same syntax as
|
||||||
send.
|
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
|
.RE
|
||||||
.RS
|
.RS
|
||||||
.PP
|
.PP
|
||||||
|
|
29
man/wmii.tex
29
man/wmii.tex
|
@ -305,9 +305,8 @@ all of the clients with the given tag applied. The special
|
||||||
following commands:
|
following commands:
|
||||||
\begin{description}
|
\begin{description}
|
||||||
\item[select] Select a client: \\
|
\item[select] Select a client: \\
|
||||||
\SP\SP select \Arg{left\Bar right\Bar up\Bar down} \\
|
\SP\SP select \Arg{direction} \\
|
||||||
\SP\SP select \Arg{row number\Bar sel} \oArg{frame number} \\
|
\SP\SP select \Arg{frame} \\
|
||||||
\SP\SP select client \Arg{client}
|
|
||||||
\item[send] Send a client somewhere:
|
\item[send] Send a client somewhere:
|
||||||
\begin{description}
|
\begin{description}
|
||||||
\item[send \Arg{client|sel} \Arg{up|down|left|right}]
|
\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}
|
\end{description}
|
||||||
\item[swap] Swap a client with another. Same syntax as
|
\item[swap] Swap a client with another. Same syntax as
|
||||||
send.
|
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}
|
\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.
|
\item[index] Read for a description of the contents of a tag.
|
||||||
\end{description}
|
\end{description}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
'\" t
|
'\" 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.
|
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||||
.de Vb
|
.de Vb
|
||||||
.ft CW
|
.ft CW
|
||||||
|
@ -10,19 +10,17 @@
|
||||||
|
|
||||||
.fi
|
.fi
|
||||||
..
|
..
|
||||||
.TH "WMIILOOP" "1" "25 May 2007" "" ""
|
.TH "WMIILOOP" "1" " Wed Dec 31 19:00:00 EDT 1969
|
||||||
|
" "" ""
|
||||||
.SH NAME
|
.SH NAME
|
||||||
|
|
||||||
wmiiloop\-VERSION
|
wmiiloop\-VERSION
|
||||||
.PP
|
.PP
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
||||||
eval
|
eval
|
||||||
"$(wmiiloop
|
"$(wmiiloop
|
||||||
<events)"
|
<events)"
|
||||||
.PP
|
.PP
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
wmiiloop
|
wmiiloop
|
||||||
is an awk and sh script which preprocesses \fIsh\fP(1)
|
is an awk and sh script which preprocesses \fIsh\fP(1)
|
||||||
|
@ -66,7 +64,6 @@ Mod1_j() {
|
||||||
.Ve
|
.Ve
|
||||||
.PP
|
.PP
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|
||||||
\fIwmii\fP(1),
|
\fIwmii\fP(1),
|
||||||
\fIwmii\fP(1)\&.
|
\fIwmii\fP(1)\&.
|
||||||
\fIwmiir\fP(1),
|
\fIwmiir\fP(1),
|
||||||
|
|
Loading…
Reference in New Issue