bb/scripts/bbstartup
Bruce Hill 88fd9c416b Moved bbstartup into a script, renamed helper/ -> scripts/, and added
bbshutdown script. Also tweaked some of the precedence.
2020-02-24 03:39:44 -08:00

16 lines
514 B
Bash
Executable File

#!/bin/sh
# This file contains the script that is run when bb launches
[ ! -d "$XDG_DATA_HOME/bb" ] && mkdir -p "$XDG_DATA_HOME/bb"
# Load key bindings
if [ "$BBPATH" ]; then
cat "$BBPATH/bindings.bb" "$XDG_CONFIG_HOME/bb/bindings.bb"
else
cat "$sysconfdir/xdg/bb/bindings.bb" "$XDG_CONFIG_HOME/bb/bindings.bb"
fi 2>/dev/null | awk '/^#/ {next} /^[^ ]/ {printf "\0bind:"} {print $0} END {printf "\0"}' >> "$BBCMD"
if [ -e "$XDG_DATA_HOME/bb/settings.sh" ]; then
. "$XDG_DATA_HOME/bb/settings.sh"
fi