: "${BOLLUX_CONFIG:=${XDG_CONFIG_HOME:-$HOME/.config}/bollux/bollux.conf}"
if [ -f "$BOLLUX_CONFIG" ]; then
- # shellcheck disable=1090
log debug "Loading config file '$BOLLUX_CONFIG'"
+ # shellcheck disable=1090
. "$BOLLUX_CONFIG"
else
log debug "Can't load config file '$BOLLUX_CONFIG'."
## typesetting
: "${T_MARGIN:=4}" # left and right margin
: "${T_WIDTH:=0}" # width of the viewport -- 0 = get term width
- : "${T_PRE_DISPLAY:=pre,alt,both}" # how to view PRE blocks
+ : "${T_PRE_DISPLAY:=both,pre,alt}" # how to view PRE blocks
# colors -- these will be wrapped in \e[ __ m
C_RESET='\e[0m' # reset
: "${C_SIGIL:=35}" # sigil (=>, #, ##, ###, *, ```)
] quit 3 # 51 forward
r quit 4 # 52 re-request / download
G quit 5 # 53 goto a url (pre-filled)
- ` quit 6 # 54 cycle T_PRE_DISPLAY and refresh
+ p quit 6 # 54 cycle T_PRE_DISPLAY and refresh
# other keybinds
\40 forw-screen-force
h left-scroll
local url alt
local re="^=>[[:space:]]*([^[:space:]]+)([[:space:]]+(.*))?$"
while read -r; do
- log d $re
+ log d "$re"
if [[ $REPLY =~ $re ]]; then
url="${BASH_REMATCH[1]}"
alt="${BASH_REMATCH[3]}"
falling back to 80.
.TP
.BR T_PRE_DISPLAY
-comma-separated list of items; default is pre,alt,both.
+comma-separated list of items; default is both,pre,alt.
.br
How to display preformatted text blocks.
.I pre