From 3b65de394b8731938b4e9e6040131aa59be33cf9 Mon Sep 17 00:00:00 2001 From: seanpringle Date: Thu, 13 Sep 2012 00:19:50 +1000 Subject: [PATCH 1/3] docs --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9942e84..781d7a4 100644 --- a/README.md +++ b/README.md @@ -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. From 5750bf8feec49c48cf08602f832e464ea5317c91 Mon Sep 17 00:00:00 2001 From: seanpringle Date: Thu, 13 Sep 2012 15:50:20 +1000 Subject: [PATCH 2/3] more find_or_start error checking --- xoat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xoat.c b/xoat.c index f325a83..bd5da58 100644 --- a/xoat.c +++ b/xoat.c @@ -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); From f22af26086e95b1572f991d16d69a98ca151a479 Mon Sep 17 00:00:00 2001 From: seanpringle Date: Thu, 13 Sep 2012 16:06:40 +1000 Subject: [PATCH 3/3] docs --- config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/config.h b/config.h index 2617b4a..95f0db0 100644 --- a/config.h +++ b/config.h @@ -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" },