Change config file
This commit is contained in:
11
highbeam
11
highbeam
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user