bb/scripts/bbstartup

17 lines
485 B
Plaintext
Raw Normal View History

#!/bin/sh
# This file contains the script that is run when bb launches
2020-06-03 23:40:44 -07:00
# Delay running command-line commands (bb +<cmd>) until after startup:
tmpfile="$(mktemp "${TMPDIR-/tmp}/bb-cmdline-XXXXXX")"
trap 'cat "$tmpfile" >> "$BBCMD"; rm -f "$tmpfile"' EXIT
mv "$BBCMD" "$tmpfile"
# Create bb data dir:
[ ! -d "$XDG_DATA_HOME/bb" ] && mkdir -p "$XDG_DATA_HOME/bb"
2020-02-24 02:59:04 -08:00
# Load key bindings
2021-01-28 22:32:42 -08:00
bbkeys
2020-06-03 23:40:44 -07:00
# Reload settings
[ -e "$XDG_DATA_HOME/bb/settings.sh" ] && . "$XDG_DATA_HOME/bb/settings.sh"