aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-04-08 23:58:37 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-04-08 23:58:37 -0700
commite0a30fe02bf1c75ebd211dd8f3defa6241c5b82b (patch)
treee7bc00e607ba762ade236865ab6b6dcbee421133 /README.md
parentadcb0a43e02cd34a289fd66f290d87f9ac91197c (diff)
Some overhaul and refactoring. bbstartup.sh and bindings.bb have been
moved into scripts/bbstartup and scripts/bbbindkeys alongside the other scripts. Some minor bugs have been fixed as well, and a few bindings added.
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 13 insertions, 15 deletions
diff --git a/README.md b/README.md
index d8de638..a00ee98 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@ The core idea behind `bb` is that `bb` is a file **browser**, not a file
to the filesystem (passing selected files as arguments), rather than
reinventing the wheel by hard-coding operations like `rm`, `mv`, `cp`, `touch`,
and so on. Shell scripts can be bound to keypresses in
-`~/.config/bb/bindings.bb`. For example, `D` is bound to a script that prints a
+`~/.config/bb/bbbindkeys`. For example, `D` is bound to a script that prints a
confirmation message, then runs `rm -rf "$@" && bbcmd deselect refresh`,
which means selecting `file1` and `file2`, then pressing `D` will cause `bb` to
run the shell command `rm -rf file1 file2` and then tell `bb` to deselect all
@@ -59,20 +59,18 @@ run the shell command `rm -rf file1 file2` and then tell `bb` to deselect all
## Customizing bb
-`bb` runs a script at startup (by default [bbstartup.sh](bbstartup.sh), installed
-to `/etc/xdg/bb/bbstartup.sh`) that sets up `bb`'s key bindings and a few other
-minor things. You can override this with your own custom startup script by creating
-a file at `~/.config/bb/bbstartup.sh`. The default startup script loads key bindings
-from (in order) `/etc/xdg/bb/bindings.bb` and `~/.config/bb/bindings.bb` (or if
-neither exists, from the local directory).
-
-`bb` comes with a bunch of pre-defined bindings for basic actions in
-[bindings.bb](bindings.bb) (installed to `/etc/xdg/bb/bindings.bb`). It's very
-easy to add new bindings for whatever custom scripts you want to run, just
-create a file called `~/.config/bb/bindings.bb` and put your bindings there.
-You can also create bindings at runtime by hitting `Ctrl-b`, pressing the key
-you want to bind, and then entering in a script to run (in case you want to set
-up an easy way to repeat some custom workflow).
+When `bb` launches, it first updates `bb`'s `$PATH` environment variable to
+include, in order, `~/.config/bb` and `/etc/xdg/bb`. Then, `bb` will run the
+command `bbstartup` (the default implementation is found at
+[scripts/bbstartup](scripts/bbstartup), along with other default `bb` commands).
+`bbstartup` will call `bbbindkeys` and may also set up configuration options like
+which columns to display and what sort order to use. All of these behaviors can
+be customized by creating custom local versions of these files in `~/.config/bb/`.
+The default versions can be found in `/etc/xdg/bb/`.
+
+You can also create temporary bindings at runtime by hitting `Ctrl-b`, pressing
+the key you want to bind, and then entering in a script to run (in case you
+want to set up an easy way to repeat some custom workflow).
### API