remove -t; prepare for mergint into master
This commit is contained in:
parent
0783fd073c
commit
78fb523f9f
3
config.h
3
config.h
|
@ -34,9 +34,6 @@ static struct Config config = {
|
||||||
|
|
||||||
/* area around the icon, the triangle and the separator */
|
/* area around the icon, the triangle and the separator */
|
||||||
.horzpadding = 8,
|
.horzpadding = 8,
|
||||||
|
|
||||||
/* if nonzero, enable type-to-select feature, can be togglet with -t */
|
|
||||||
.typetoselect = 0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
17
xmenu.1
17
xmenu.1
|
@ -3,7 +3,7 @@
|
||||||
xmenu \- menu utility for X
|
xmenu \- menu utility for X
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B xmenu
|
.B xmenu
|
||||||
.RB [ \-irtw ]
|
.RB [ \-irw ]
|
||||||
.RB [ -p
|
.RB [ -p
|
||||||
.IR position ]
|
.IR position ]
|
||||||
.RI [ title ]
|
.RI [ title ]
|
||||||
|
@ -58,10 +58,6 @@ must spawn at the position 100x500 of the monitor 0.
|
||||||
If this option is set, the right mouse button is disabled;
|
If this option is set, the right mouse button is disabled;
|
||||||
so pressing it will not trigger any menu item.
|
so pressing it will not trigger any menu item.
|
||||||
.TP
|
.TP
|
||||||
.B -t
|
|
||||||
If this option is set, the type-to-select feature is enabled,
|
|
||||||
so typing a string will select the first item matching it.
|
|
||||||
.TP
|
|
||||||
.B -w
|
.B -w
|
||||||
Asks the window manager to draw a border around the menus.
|
Asks the window manager to draw a border around the menus.
|
||||||
This option may be buggy in some window managers,
|
This option may be buggy in some window managers,
|
||||||
|
@ -105,6 +101,7 @@ Items can be selected using the arrow keys,
|
||||||
Tab (with and without Shift),
|
Tab (with and without Shift),
|
||||||
Home, End,
|
Home, End,
|
||||||
Enter and Esc, and 1-9 keys.
|
Enter and Esc, and 1-9 keys.
|
||||||
|
Items can also be selected by typing the first several characters in it.
|
||||||
.TP
|
.TP
|
||||||
.BR Home
|
.BR Home
|
||||||
Select the first item in the menu.
|
Select the first item in the menu.
|
||||||
|
@ -117,16 +114,14 @@ Cycle through the items in the regular direction.
|
||||||
.TP
|
.TP
|
||||||
.BR Tab
|
.BR Tab
|
||||||
Cycle through the items in the regular direction.
|
Cycle through the items in the regular direction.
|
||||||
If the type-to-select feature is enabled, and there is a typed string in memory,
|
When the type\-to\-select feature is active, cycle through matching items instead.
|
||||||
cycle through matching items instead.
|
|
||||||
.TP
|
.TP
|
||||||
.BR Up
|
.BR Up
|
||||||
Cycle through the items in the reverse direction.
|
Cycle through the items in the reverse direction.
|
||||||
.TP
|
.TP
|
||||||
.BR Shift-Tab
|
.BR Shift-Tab
|
||||||
Cycle through the items in the reverse direction.
|
Cycle through the items in the reverse direction.
|
||||||
If the type-to-select feature is enabled, and there is a typed string in memory,
|
When the type\-to\-select feature is active, cycle through matching items instead.
|
||||||
cycle through matching items instead.
|
|
||||||
.TP
|
.TP
|
||||||
.BR Right ", " Enter
|
.BR Right ", " Enter
|
||||||
Select the highlighted item.
|
Select the highlighted item.
|
||||||
|
@ -137,6 +132,10 @@ Go to the menu above.
|
||||||
.B Esc
|
.B Esc
|
||||||
Go to the menu above or exit xmenu.
|
Go to the menu above or exit xmenu.
|
||||||
.PP
|
.PP
|
||||||
|
.B xmenu
|
||||||
|
features the type\-to\-select selecting style,
|
||||||
|
where typing a string will select the first item matching it.
|
||||||
|
.PP
|
||||||
Additional key bindings can be set at compile time by changing the
|
Additional key bindings can be set at compile time by changing the
|
||||||
.B config.h
|
.B config.h
|
||||||
file.
|
file.
|
||||||
|
|
9
xmenu.c
9
xmenu.c
|
@ -141,7 +141,7 @@ getoptions(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "ip:rtw")) != -1) {
|
while ((ch = getopt(argc, argv, "ip:rw")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'i':
|
case 'i':
|
||||||
iflag = 1;
|
iflag = 1;
|
||||||
|
@ -153,9 +153,6 @@ getoptions(int argc, char *argv[])
|
||||||
case 'r':
|
case 'r':
|
||||||
rflag = 1;
|
rflag = 1;
|
||||||
break;
|
break;
|
||||||
case 't':
|
|
||||||
config.typetoselect = !config.typetoselect;
|
|
||||||
break;
|
|
||||||
case 'w':
|
case 'w':
|
||||||
wflag = 1;
|
wflag = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -1376,8 +1373,6 @@ enteritem:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
append:
|
append:
|
||||||
if (!config.typetoselect)
|
|
||||||
break;
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
append(text, buf, sizeof text, len);
|
append(text, buf, sizeof text, len);
|
||||||
if ((item = matchitem(currmenu, text, 0)))
|
if ((item = matchitem(currmenu, text, 0)))
|
||||||
|
@ -1490,7 +1485,7 @@ main(int argc, char *argv[])
|
||||||
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
|
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
|
||||||
errx(1, "XOpenIM: could not open input device");
|
errx(1, "XOpenIM: could not open input device");
|
||||||
|
|
||||||
/* get configuration */
|
/* process configuration and window class */
|
||||||
getresources();
|
getresources();
|
||||||
classh.res_class = PROGNAME;
|
classh.res_class = PROGNAME;
|
||||||
classh.res_name = getoptions(argc, argv);
|
classh.res_name = getoptions(argc, argv);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user