about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-02-27 15:55:53 -0600
committerCase Duckworth2021-02-27 15:55:53 -0600
commitc62c43499f35030949253c1408833925b42ea3f5 (patch)
tree93472519e86c6db67ca9c1b587e3a4d209f1508a
parentChange BOLLUX_PRE_DISPLAY to T_PRE_DISPLAY; document (diff)
downloadbollux-c62c43499f35030949253c1408833925b42ea3f5.tar.gz
bollux-c62c43499f35030949253c1408833925b42ea3f5.zip
HOTFIX: actually LOAD the config file
Bollux was trying to load the config from $XDG_CONFIG_DIR, which /isn't/
anything, so far as XDG is concerned.  It's been fixed to
XDG_CONFIG_HOME -- and I've added a DEBUG variable to make debugging
stuff /even easier/ later.
-rw-r--r--[-rwxr-xr-x]bollux4
1 files changed, 3 insertions, 1 deletions
diff --git a/bollux b/bollux index ac17842..697447f 100755..100644 --- a/bollux +++ b/bollux
@@ -120,10 +120,11 @@ bollux_args() {
120 120
121# process config file and set variables 121# process config file and set variables
122bollux_config() { 122bollux_config() {
123 : "${BOLLUX_CONFIG:=${XDG_CONFIG_DIR:-$HOME/.config}/bollux/bollux.conf}" 123 : "${BOLLUX_CONFIG:=${XDG_CONFIG_HOME:-$HOME/.config}/bollux/bollux.conf}"
124 124
125 if [ -f "$BOLLUX_CONFIG" ]; then 125 if [ -f "$BOLLUX_CONFIG" ]; then
126 # shellcheck disable=1090 126 # shellcheck disable=1090
127 log debug "Loading config file '$BOLLUX_CONFIG'"
127 . "$BOLLUX_CONFIG" 128 . "$BOLLUX_CONFIG"
128 else 129 else
129 log debug "Can't load config file '$BOLLUX_CONFIG'." 130 log debug "Can't load config file '$BOLLUX_CONFIG'."
@@ -1121,5 +1122,6 @@ history_forward() {
1121} 1122}
1122 1123
1123if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then 1124if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
1125 ${DEBUG:-false} && set -x
1124 run bollux "$@" 1126 run bollux "$@"
1125fi 1127fi