diff options
| author | William Casarin <jb55@jb55.com> | 2018-07-09 18:42:25 -0700 |
|---|---|---|
| committer | William Casarin <jb55@jb55.com> | 2018-07-09 18:42:25 -0700 |
| commit | 1ee2efb9667af35d5e5ccfea6824701c2fdbce44 (patch) | |
| tree | fe3609e6a20cc3574fbd358651ec34e834bdecd9 /command.c | |
| parent | 6e938b9a190ae6c41614b2377f44d4e0ffc28b78 (diff) | |
hardcode commands for now until I have a config format
Diffstat (limited to 'command.c')
| -rw-r--r-- | command.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -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 * |
