Merge branch 'master' into personal

This commit is contained in:
seanpringle
2012-09-13 16:08:32 +10:00
3 changed files with 10 additions and 4 deletions

View File

@@ -53,7 +53,11 @@ Some elements that proved to be the wrong direction for xoat have been removed.
* Snapshot allows the freedom to mess windows up then quicky revert to a known state.
* Some EWMH desktop atoms have been dumped as surplus to requirements.
### config.h
All customization happens in config.h. See in-line comments there.
**Note**: config.h is tracked! Use a local git branch to protect any customization.

View File

@@ -103,6 +103,7 @@ binding keys[] = {
{ .mod = Mod4Mask, .key = XK_r, .act = ACTION_ROLLBACK },
// Find or start apps by WM_CLASS (lower case match).
// Only works for apps that use some form of their binary name as their class...
{ .mod = AnyModifier, .key = XK_F1, .act = ACTION_FIND_OR_START, .data = "urxvt" },
{ .mod = AnyModifier, .key = XK_F2, .act = ACTION_FIND_OR_START, .data = "chromium" },
{ .mod = AnyModifier, .key = XK_F3, .act = ACTION_FIND_OR_START, .data = "pcmanfm" },

7
xoat.c
View File

@@ -513,8 +513,9 @@ void action_find_or_start(void *data, int num, client *cli)
{
int i; client *c; char *class = data;
for_windows(i, c) if (c->manage && !strcasecmp(c->class, class))
{ client_activate(c); return; }
for_windows(i, c)
if (c->visible && c->manage && c->class && !strcasecmp(c->class, class))
{ client_activate(c); return; }
exec_cmd(class);
}
@@ -579,7 +580,7 @@ void action_rollback(void *data, int num, client *cli)
for (i = snapshot.depth-1; i > -1; i--)
{
if ((s = snapshot.clients[i]) && (c = window_build_client(s->window))
&& !strcmp(s->class, c->class) && c->visible && c->manage)
&& c->class && !strcmp(s->class, c->class) && c->visible && c->manage)
{
client_place_spot(c, s->spot, s->monitor, 1);
client_raise_family(c);