Merge branch 'origin' into linux

This commit is contained in:
Christian Neukirchen 2010-09-26 01:43:12 +02:00
commit b11c12e99b
6 changed files with 26 additions and 25 deletions

8
cwm.1
View File

@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.Dd $Mdocdate: June 19 2009 $ .Dd $Mdocdate: August 24 2009 $
.Dt CWM 1 .Dt CWM 1
.Os .Os
.Sh NAME .Sh NAME
@ -188,7 +188,7 @@ keeps a history of the 5 previous titles of a window.
When searching, the leftmost character of the result list may show a When searching, the leftmost character of the result list may show a
flag: flag:
.Pp .Pp
.Bl -tag -width 10n -offset -indent -compact .Bl -tag -width 10n -offset indent -compact
.It ! .It !
The window is the currently focused window. The window is the currently focused window.
.It & .It &
@ -230,7 +230,7 @@ and a red border will be shown on those just removed.
.Sh MENUS .Sh MENUS
Menus are recalled by clicking the mouse on the root window: Menus are recalled by clicking the mouse on the root window:
.Pp .Pp
.Bl -tag -width 10n -offset -indent -compact .Bl -tag -width 10n -offset indent -compact
.It Ic M1 .It Ic M1
Show list of currently hidden windows. Show list of currently hidden windows.
Clicking on an item will unhide that window. Clicking on an item will unhide that window.
@ -266,7 +266,7 @@ with contributions from
.An Andy Adamson Aq dros@monkey.org , .An Andy Adamson Aq dros@monkey.org ,
.An Niels Provos Aq provos@monkey.org , .An Niels Provos Aq provos@monkey.org ,
and and
.An Antti Nykänen Aq aon@iki.fi . .An Antti Nyk\(:anen Aq aon@iki.fi .
Ideas, discussion with many others. Ideas, discussion with many others.
.Sh HISTORY .Sh HISTORY
.Nm .Nm

12
cwmrc.5
View File

@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.Dd $Mdocdate: July 23 2010 $ .Dd $Mdocdate: September 25 2010 $
.Dt CWMRC 5 .Dt CWMRC 5
.Os .Os
.Sh NAME .Sh NAME
@ -29,7 +29,7 @@ The following options are accepted in the configuration file:
.Bl -tag -width Ds -compact .Bl -tag -width Ds -compact
.It Ic autogroup Ar group windowname .It Ic autogroup Ar group windowname
.It Ic autogroup Ar group windowname,windowclass .It Ic autogroup Ar group windowname,windowclass
Control automatic window grouping, based on the class and/or name Control automatic window grouping, based on the name and/or class
properties, where properties, where
.Ar group .Ar group
is a number between 0 and 9. is a number between 0 and 9.
@ -38,7 +38,7 @@ allow for
.Dq sticky .Dq sticky
windows in sticky group mode. windows in sticky group mode.
.Pp .Pp
The class and name of a window may be obtained using The name and class of a window may be obtained using
.Xr xprop 1 . .Xr xprop 1 .
.Pp .Pp
.It Ic bind Ar keys command .It Ic bind Ar keys command
@ -138,7 +138,7 @@ can be used for applications such as
where the user may wish to remain visible. where the user may wish to remain visible.
.Pp .Pp
.It Ic ignore Ar windowname .It Ic ignore Ar windowname
Ignore windows with the name Ignore, and do not warp to, windows with the name
.Ar windowname .Ar windowname
when drawing borders and cycling through windows. when drawing borders and cycling through windows.
.Pp .Pp
@ -147,7 +147,7 @@ Cause the creation of a mouse binding, or replacement of a default
mouse binding. mouse binding.
The modifier keys come first, followed by a The modifier keys come first, followed by a
.Sq - . .Sq - .
.Pb .Pp
The following modifiers are recognised: The following modifiers are recognised:
.Pp .Pp
.Bl -tag -width Ds -offset indent -compact .Bl -tag -width Ds -offset indent -compact
@ -164,7 +164,7 @@ The Mod4 key (normally the windows key).
The The
.Sq - .Sq -
should be followed by number: should be followed by number:
.Pb .Pp
.Bl -tag -width Ds -offset indent -compact .Bl -tag -width Ds -offset indent -compact
.It 1 .It 1
Left mouse button. Left mouse button.

View File

@ -179,19 +179,19 @@ group_init(struct screen_ctx *sc)
} }
void void
group_make_autogroup(struct conf *conf, char *class, int no) group_make_autogroup(struct conf *conf, char *val, int no)
{ {
struct autogroupwin *aw; struct autogroupwin *aw;
char *p; char *p;
aw = xcalloc(1, sizeof(*aw)); aw = xcalloc(1, sizeof(*aw));
if ((p = strchr(class, ',')) == NULL) { if ((p = strchr(val, ',')) == NULL) {
aw->name = NULL; aw->name = NULL;
aw->class = xstrdup(class); aw->class = xstrdup(val);
} else { } else {
*(p++) = '\0'; *(p++) = '\0';
aw->name = xstrdup(class); aw->name = xstrdup(val);
aw->class = xstrdup(p); aw->class = xstrdup(p);
} }
aw->num = no; aw->num = no;
@ -426,6 +426,7 @@ group_autogroup(struct client_ctx *cc)
if (cc->app_class == NULL || cc->app_name == NULL) if (cc->app_class == NULL || cc->app_name == NULL)
return; return;
if (xu_getprop(cc->win, _NET_WM_DESKTOP, XA_CARDINAL, if (xu_getprop(cc->win, _NET_WM_DESKTOP, XA_CARDINAL,
1, (unsigned char **)&grpno) > 0) { 1, (unsigned char **)&grpno) > 0) {
if (*grpno == 0xffffffff) if (*grpno == 0xffffffff)

View File

@ -366,9 +366,10 @@ yylex(void)
return (0); return (0);
if (next == quotec || c == ' ' || c == '\t') if (next == quotec || c == ' ' || c == '\t')
c = next; c = next;
else if (next == '\n') else if (next == '\n') {
file->lineno++;
continue; continue;
else } else
lungetc(next); lungetc(next);
} else if (c == quotec) { } else if (c == quotec) {
*p = '\0'; *p = '\0';

View File

@ -78,11 +78,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
} }
} }
/* /* Then if there is a match on the window class name. */
* See if there is a match on the window class
* name.
*/
if (tier < 0 && strsubmatch(search, cc->app_class, 0)) { if (tier < 0 && strsubmatch(search, cc->app_class, 0)) {
cc->matchname = cc->app_class; cc->matchname = cc->app_class;
tier = 3; tier = 3;
@ -99,9 +95,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
if (cc == client_current() && tier < ntiers - 1) if (cc == client_current() && tier < ntiers - 1)
tier++; tier++;
/* /* Clients that are hidden get ranked one up. */
* Clients that are hidden get ranked one up.
*/
if (cc->flags & CLIENT_HIDDEN && tier > 0) if (cc->flags & CLIENT_HIDDEN && tier > 0)
tier--; tier--;
@ -114,7 +108,6 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
* Always make your current tierp the newly inserted * Always make your current tierp the newly inserted
* entry. * entry.
*/ */
for (t = tier; t >= 0 && ((before = tierp[t]) == NULL); t--) for (t = tier; t >= 0 && ((before = tierp[t]) == NULL); t--)
; ;

View File

@ -77,6 +77,7 @@ xev_handle_maprequest(XEvent *ee)
XMapRequestEvent *e = &ee->xmaprequest; XMapRequestEvent *e = &ee->xmaprequest;
struct client_ctx *cc = NULL, *old_cc; struct client_ctx *cc = NULL, *old_cc;
XWindowAttributes xattr; XWindowAttributes xattr;
struct winmatch *wm;
if ((old_cc = client_current()) != NULL) if ((old_cc = client_current()) != NULL)
client_ptrsave(old_cc); client_ptrsave(old_cc);
@ -86,6 +87,11 @@ xev_handle_maprequest(XEvent *ee)
cc = client_new(e->window, screen_fromroot(xattr.root), 1); cc = client_new(e->window, screen_fromroot(xattr.root), 1);
} }
TAILQ_FOREACH(wm, &Conf.ignoreq, entry) {
if (strncasecmp(wm->title, cc->name, strlen(wm->title)) == 0)
return;
}
client_ptrwarp(cc); client_ptrwarp(cc);
} }