Change config file

This commit is contained in:
ville rantanen
2013-09-03 11:02:37 +03:00
parent 30cb1e6128
commit f01c0a413e

View File

@@ -18,6 +18,10 @@ RULES=(
Color variables: $R $G $B $Y $M $C $W $BLACK
Modify to bright version by prefixing with $H (e.g. $H$G)
Background colors: $BGR $BGG $BGB $BGY $BGC $BGM $BGW
Usage: highbeam [-h] [-f config]
-h Help
-f Define config file (default ~/.highbeamrc)
'
}
@@ -48,9 +52,12 @@ BGM="${E}45m"
BGC="${E}46m"
BGW="${E}47m"
CONF_FILE=~/.highbeamrc
[[ "$1" = "-f" ]] && CONF_FILE=$2
# user rules:
[[ -e ~/.highbeamrc ]] && . ~/.highbeamrc || echo You may have wrong construction in .highbeamrc >&2 || exit
[[ -e ~/.highbeamrc ]] || {
[[ -e "${CONF_FILE}" ]] && . "${CONF_FILE}" || echo You may have wrong construction in "${CONF_FILE}" >&2 || exit
[[ -e "${CONF_FILE}" ]] || {
# list of rules
RULES=(
"[0-9]" "$C" # Show numbers with Cyan color. NOTE: since the colors are represented with numbers, having this later in the rules will break coloring!