summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmdtree.c4
-rw-r--r--command.c24
2 files changed, 17 insertions, 11 deletions
diff --git a/cmdtree.c b/cmdtree.c
index bed203c..74dc15a 100644
--- a/cmdtree.c
+++ b/cmdtree.c
@@ -72,7 +72,7 @@ setup(Drw *drw)
parentwin);
int vertwidth = 200;
mw = wa.width;
- mh = (lines + 1) * bh;
+ mh = 1 * bh;
switch (position) {
case POSITION_BOTTOM:
y = wa.height - mh;
@@ -95,8 +95,6 @@ setup(Drw *drw)
mw = vertwidth;
mh = wa.height;
}
- lines = 3;
- lines = MAX(lines, 0);
sep_width = drw_fontset_getwidth(drw, separator);
swa.override_redirect = True;
diff --git a/command.c b/command.c
index c457e43..de1ec97 100644
--- a/command.c
+++ b/command.c
@@ -36,20 +36,28 @@ command_lookup(struct command *cmd, int ncmds, const char *binding) {
return NULL;
}
-static struct command emacs_commands[] = {
- { .bind = "d", .name = "emacs-dev", .nchildren = 0, .children = NULL },
+/* static struct command emacs_commands[] = { */
+/* { .bind = "d", .name = "emacs-dev", .nchildren = 0, .children = NULL }, */
+/* }; */
+
+static struct command browser_commands[] = {
+ { .bind = "s", .name = "chrome", .nchildren = 0, .children = NULL },
+ { .bind = "c", .name = "chromium", .nchildren = 0, .children = NULL },
+ { .bind = "f", .name = "firefox", .nchildren = 0, .children = NULL },
};
static const struct command examples[] = {
- { .bind = "f", .name = "firefox", .nchildren = 0, .children = NULL },
+ { .bind = "b",
+ .name = "browsers",
+ .nchildren = LENGTH(browser_commands),
+ .children = browser_commands
+ },
{ .bind = "e",
- .name = "emacs",
- .children = emacs_commands,
- .nchildren = LENGTH(emacs_commands)
+ .name = "emacs-dev",
+ .children = NULL,
+ .nchildren = 0
},
-
- { .bind = "N", .name = "networking", .nchildren = 0, .children = NULL },
};
struct command *