summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Casarin <jb55@jb55.com>2018-07-09 20:42:23 -0700
committerWilliam Casarin <jb55@jb55.com>2018-07-09 20:42:23 -0700
commit70629701efb30043e3554fa099018efbf1ac3a1d (patch)
tree0fa9ccbc0a5586ff1e3f526f9799e06bc975be16
parente0bbbe3beb40f4ecd396c12745911bbdb1ee73c9 (diff)
keybindings help
-rw-r--r--README.md9
-rw-r--r--cfg.def.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index aa62444..7bc8e2a 100644
--- a/README.md
+++ b/README.md
@@ -20,3 +20,12 @@ Configuring cmdtree will be easy (not yet implemented, still WIP):
Configuring cmdtree is currently not so easy, but you just need to tweak
[cfg.def.h](cfg.def.h) to your liking before building.
+
+
+key bindings
+------------
+
+```
+ESC quit
+Backspace go up one level
+```
diff --git a/cfg.def.h b/cfg.def.h
index d63a88c..3a8d83d 100644
--- a/cfg.def.h
+++ b/cfg.def.h
@@ -55,11 +55,16 @@ static struct scheme schemes[SchemeLast] = {
.children = (cs), \
},
+static struct command test_commands[] = {
+ DEFCMD("t", "test command", "echo ok")
+};
+
static struct command browser_commands[] = {
DEFCMD("s", "chrome scaled", "chrome")
DEFCMD("c", "chromium", "chromium")
DEFCMD("f", "firefox", "firefox")
DEFCMD("k", "kill chrome", "pkill --oldest chromium")
+ DEFPREFIX("t", "test nested prefix", test_commands)
};
static struct command commands[] = {