Skip to content
Permalink
Browse files

Allow *(TEXT|FORMAT|SEP) variables to be empty string

  • Loading branch information
jtyr committed Apr 16, 2019
1 parent c501189 commit c02a7755e8eaeffeb61597bc3d763251f3c231b4
@@ -42,14 +42,14 @@ function GbtCarCustom() {
[model-root-Bg]=${!C_BG:-$defaultRootBg}
[model-root-Fg]=${!C_FG:-$defaultRootFg}
[model-root-Fm]=${!C_FM:-$defaultRootFm}
[model-root-Text]=${!C_FORMAT:-' {{ Text }} '}
[model-root-Text]=${!C_FORMAT-' {{ Text }} '}
[model-Text-Bg]=${!C_TEXT_BG:-${!C_BG:-$defaultRootBg}}
[model-Text-Fg]=${!C_TEXT_FG:-${!C_FG:-$defaultRootFg}}
[model-Text-Fm]=${!C_TEXT_FM:-${!C_FM:-$defaultRootFm}}
[model-Text-Text]=${!C_TEXT_TEXT:-$defaultTextText}
[model-Text-Text]=${!C_TEXT_TEXT-$defaultTextText}

[display]=${!C_DISPLAY:-$defaultDisplay}
[wrap]=${!C_WRAP:-0}
[sep]=${!C_SEP:-'\x00'}
[sep]=${!C_SEP-'\x00'}
)
}
@@ -11,9 +11,9 @@ function GbtCarDir() {
if [ -n "$homesign" ] && [[ $PWD == $HOME ]]; then
text=$homesign
elif [[ $PWD == '/' ]]; then
text=${GBT_CAR_DIR_DIRSEP:-/}
text=${GBT_CAR_DIR_DIRSEP-/}
elif [[ $PWD == '//' ]]; then
text=${GBT_CAR_DIR_DIRSEP:-/}${GBT_CAR_DIR_DIRSEP:-/}
text=${GBT_CAR_DIR_DIRSEP-/}${GBT_CAR_DIR_DIRSEP-/}
else
local first=1
local cur=1
@@ -25,7 +25,7 @@ function GbtCarDir() {
fi

if [[ $first != 1 ]]; then
text+=${GBT_CAR_DIR_DIRSEP:-/}
text+=${GBT_CAR_DIR_DIRSEP-/}
fi

text+=$d
@@ -45,15 +45,15 @@ function GbtCarDir() {
[model-root-Bg]=${GBT_CAR_DIR_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_DIR_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_DIR_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_DIR_FORMAT:-' {{ Dir }} '}
[model-root-Text]=${GBT_CAR_DIR_FORMAT-' {{ Dir }} '}

[model-Dir-Bg]=${GBT_CAR_DIR_DIR_BG:-${GBT_CAR_DIR_BG:-$defaultRootBg}}
[model-Dir-Fg]=${GBT_CAR_DIR_DIR_FG:-${GBT_CAR_DIR_FG:-$defaultRootFg}}
[model-Dir-Fm]=${GBT_CAR_DIR_DIR_FM:-${GBT_CAR_DIR_FM:-$defaultRootFm}}
[model-Dir-Text]=${GBT_CAR_DIR_DIR_TEXT:-$text}
[model-Dir-Text]=${GBT_CAR_DIR_DIR_TEXT-$text}

[display]=${GBT_CAR_DIR_DISPLAY:-1}
[wrap]=${GBT_CAR_DIR_WRAP:-0}
[sep]=${GBT_CAR_DIR_SEP:-'\x00'}
[sep]=${GBT_CAR_DIR_SEP-'\x00'}
)
}
@@ -22,14 +22,14 @@ function GbtCarExecTime() {
[model-root-Bg]=${GBT_CAR_EXECTIME_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_EXECTIME_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_EXECTIME_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_EXECTIME_FORMAT:-' {{ Time }} '}
[model-root-Text]=${GBT_CAR_EXECTIME_FORMAT-' {{ Time }} '}
[model-Time-Bg]=${GBT_CAR_EXECTIME_TIME_BG:-${GBT_CAR_EXECTIME_BG:-$defaultRootBg}}
[model-Time-Fg]=${GBT_CAR_EXECTIME_TIME_FG:-${GBT_CAR_EXECTIME_FG:-$defaultRootFg}}
[model-Time-Fm]=${GBT_CAR_EXECTIME_TIME_FM:-${GBT_CAR_EXECTIME_FM:-$defaultRootFm}}
[model-Time-Text]=${GBT_CAR_EXECTIME_TIME_TEXT:-$exectime}
[model-Time-Text]=${GBT_CAR_EXECTIME_TIME_TEXT-$exectime}

[display]=${GBT_CAR_EXECTIME_DISPLAY:-1}
[wrap]=${GBT_CAR_EXECTIME_WRAP:-0}
[sep]=${GBT_CAR_EXECTIME_SEP:-'\x00'}
[sep]=${GBT_CAR_EXECTIME_SEP-'\x00'}
)
}

Large diffs are not rendered by default.

@@ -19,30 +19,30 @@ function GbtCarHostname() {
[model-root-Bg]=${GBT_CAR_HOSTNAME_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_HOSTNAME_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_HOSTNAME_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_HOSTNAME_FORMAT:-' {{ UserHost }} '}
[model-root-Text]=${GBT_CAR_HOSTNAME_FORMAT-' {{ UserHost }} '}

[model-UserHost-Bg]=${GBT_CAR_HOSTNAME_USERHOST_BG:-${GBT_CAR_HOSTNAME_BG:-$defaultRootBg}}
[model-UserHost-Fg]=${GBT_CAR_HOSTNAME_USERHOST_FG:-${GBT_CAR_HOSTNAME_FG:-$defaultRootFg}}
[model-UserHost-Fm]=${GBT_CAR_HOSTNAME_USERHOST_FM:-${GBT_CAR_HOSTNAME_FM:-$defaultRootFm}}
[model-UserHost-Text]=${GBT_CAR_HOSTNAME_USERHOST_FORMAT:-"$uaFormat@{{ Host }}"}
[model-UserHost-Text]=${GBT_CAR_HOSTNAME_USERHOST_FORMAT-"$uaFormat@{{ Host }}"}

[model-Admin-Bg]=${GBT_CAR_HOSTNAME_ADMIN_BG:-${GBT_CAR_HOSTNAME_USERHOST_BG:-${GBT_CAR_HOSTNAME_BG:-$defaultRootBg}}}
[model-Admin-Fg]=${GBT_CAR_HOSTNAME_ADMIN_FG:-${GBT_CAR_HOSTNAME_USERHOST_FG:-${GBT_CAR_HOSTNAME_FG:-$defaultRootFg}}}
[model-Admin-Fm]=${GBT_CAR_HOSTNAME_ADMIN_FM:-${GBT_CAR_HOSTNAME_USERHOST_FM:-${GBT_CAR_HOSTNAME_FM:-$defaultRootFm}}}
[model-Admin-Text]=${GBT_CAR_HOSTNAME_ADMIN_TEXT:-${USER:-$(id -un)}}
[model-Admin-Text]=${GBT_CAR_HOSTNAME_ADMIN_TEXT-${USER:-$(id -un)}}

[model-User-Bg]=${GBT_CAR_HOSTNAME_USER_BG:-${GBT_CAR_HOSTNAME_USERHOST_BG:-${GBT_CAR_HOSTNAME_BG:-$defaultRootBg}}}
[model-User-Fg]=${GBT_CAR_HOSTNAME_USER_FG:-${GBT_CAR_HOSTNAME_USERHOST_FG:-${GBT_CAR_HOSTNAME_FG:-$defaultRootFg}}}
[model-User-Fm]=${GBT_CAR_HOSTNAME_USER_FM:-${GBT_CAR_HOSTNAME_USERHOST_FM:-${GBT_CAR_HOSTNAME_FM:-$defaultRootFm}}}
[model-User-Text]=${GBT_CAR_HOSTNAME_USER_TEXT:-${USER:-$(id -un)}}
[model-User-Text]=${GBT_CAR_HOSTNAME_USER_TEXT-${USER:-$(id -un)}}

[model-Host-Bg]=${GBT_CAR_HOSTNAME_HOST_BG:-${GBT_CAR_HOSTNAME_BG:-$defaultRootBg}}
[model-Host-Fg]=${GBT_CAR_HOSTNAME_HOST_FG:-${GBT_CAR_HOSTNAME_FG:-$defaultRootFg}}
[model-Host-Fm]=${GBT_CAR_HOSTNAME_HOST_FM:-${GBT_CAR_HOSTNAME_FM:-$defaultRootFm}}
[model-Host-Text]=${GBT_CAR_HOSTNAME_HOST_TEXT:-${hostname%%.*}}
[model-Host-Text]=${GBT_CAR_HOSTNAME_HOST_TEXT-${hostname%%.*}}

[display]=${GBT_CAR_HOSTNAME_DISPLAY:-1}
[wrap]=${GBT_CAR_HOSTNAME_WRAP:-0}
[sep]=${GBT_CAR_HOSTNAME_SEP:-'\x00'}
[sep]=${GBT_CAR_HOSTNAME_SEP-'\x00'}
)
}
@@ -26,37 +26,37 @@ function GbtCarKubectl() {
done
fi

GbtDecorateUnicode ${GBT_CAR_KUBECTL_ICON_TEXT:-'\xe2\x8e\x88'}
GbtDecorateUnicode ${GBT_CAR_KUBECTL_ICON_TEXT-'\xe2\x8e\x88'}
local defaultIconText=$GBT__RETVAL

GBT_CAR=(
[model-root-Bg]=${GBT_CAR_KUBECTL_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_KUBECTL_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_KUBECTL_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_KUBECTL_FORMAT:-' {{ Icon }} {{ Context }} '}
[model-root-Text]=${GBT_CAR_KUBECTL_FORMAT-' {{ Icon }} {{ Context }} '}
[model-Icon-Bg]=${GBT_CAR_KUBECTL_ICON_BG:-${GBT_CAR_KUBECTL_BG:-$defaultRootBg}}
[model-Icon-Fg]=${GBT_CAR_KUBECTL_ICON_FG:-${GBT_CAR_KUBECTL_FG:-$defaultRootFg}}
[model-Icon-Fm]=${GBT_CAR_KUBECTL_ICON_FM:-${GBT_CAR_KUBECTL_FM:-$defaultRootFm}}
[model-Icon-Text]=$defaultIconText
[model-Context-Bg]=${GBT_CAR_KUBECTL_CONTEXT_BG:-${GBT_CAR_KUBECTL_BG:-$defaultRootBg}}
[model-Context-Fg]=${GBT_CAR_KUBECTL_CONTEXT_FG:-${GBT_CAR_KUBECTL_FG:-$defaultRootFg}}
[model-Context-Fm]=${GBT_CAR_KUBECTL_CONTEXT_FM:-${GBT_CAR_KUBECTL_FM:-$defaultRootFm}}
[model-Context-Text]=${GBT_CAR_KUBECTL_CONTEXT_TEXT:-${contextInfo[context]}}
[model-Context-Text]=${GBT_CAR_KUBECTL_CONTEXT_TEXT-${contextInfo[context]}}
[model-Cluster-Bg]=${GBT_CAR_KUBECTL_CLUSTER_BG:-${GBT_CAR_KUBECTL_BG:-$defaultRootBg}}
[model-Cluster-Fg]=${GBT_CAR_KUBECTL_CLUSTER_FG:-${GBT_CAR_KUBECTL_FG:-$defaultRootFg}}
[model-Cluster-Fm]=${GBT_CAR_KUBECTL_CLUSTER_FM:-${GBT_CAR_KUBECTL_FM:-$defaultRootFm}}
[model-Cluster-Text]=${GBT_CAR_KUBECTL_CLUSTER_TEXT:-${contextInfo[cluster]}}
[model-Cluster-Text]=${GBT_CAR_KUBECTL_CLUSTER_TEXT-${contextInfo[cluster]}}
[model-AuthInfo-Bg]=${GBT_CAR_KUBECTL_AUTHINFO_BG:-${GBT_CAR_KUBECTL_BG:-$defaultRootBg}}
[model-AuthInfo-Fg]=${GBT_CAR_KUBECTL_AUTHINFO_FG:-${GBT_CAR_KUBECTL_FG:-$defaultRootFg}}
[model-AuthInfo-Fm]=${GBT_CAR_KUBECTL_AUTHINFO_FM:-${GBT_CAR_KUBECTL_FM:-$defaultRootFm}}
[model-AuthInfo-Text]=${GBT_CAR_KUBECTL_AUTHINFO_TEXT:-${contextInfo[authInfo]}}
[model-AuthInfo-Text]=${GBT_CAR_KUBECTL_AUTHINFO_TEXT-${contextInfo[authInfo]}}
[model-Namespace-Bg]=${GBT_CAR_KUBECTL_NAMESPACE_BG:-${GBT_CAR_KUBECTL_BG:-$defaultRootBg}}
[model-Namespace-Fg]=${GBT_CAR_KUBECTL_NAMESPACE_FG:-${GBT_CAR_KUBECTL_FG:-$defaultRootFg}}
[model-Namespace-Fm]=${GBT_CAR_KUBECTL_NAMESPACE_FM:-${GBT_CAR_KUBECTL_FM:-$defaultRootFm}}
[model-Namespace-Text]=${GBT_CAR_KUBECTL_NAMESPACE_TEXT:-${contextInfo[namespace]}}
[model-Namespace-Text]=${GBT_CAR_KUBECTL_NAMESPACE_TEXT-${contextInfo[namespace]}}

[display]=${GBT_CAR_KUBECTL_DISPLAY:-$isKubectlCurrentContextSet}
[wrap]=${GBT_CAR_KUBECTL_WRAP:-0}
[sep]=${GBT_CAR_KUBECTL_SEP:-'\x00'}
[sep]=${GBT_CAR_KUBECTL_SEP-'\x00'}
)
}
@@ -61,14 +61,14 @@ function GbtCarOs() {
local defaultRootFg=${GBT_CAR_FG:-white}
local defaultRootFm=${GBT_CAR_FM:-none}

GbtDecorateUnicode ${GBT_CAR_OS_SYMBOL_TEXT:-${GBT__OS_SYMBOLS[$os]}}
GbtDecorateUnicode ${GBT_CAR_OS_SYMBOL_TEXT-${GBT__OS_SYMBOLS[$os]}}
local defaultSymbolText=$GBT__RETVAL

GBT_CAR=(
[model-root-Bg]=${GBT_CAR_OS_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_OS_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_OS_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_OS_FORMAT:-' {{ Symbol }} '}
[model-root-Text]=${GBT_CAR_OS_FORMAT-' {{ Symbol }} '}

[model-Symbol-Bg]=${GBT_CAR_OS_SYMBOL_BG:-${GBT_CAR_OS_BG:-$defaultRootBg}}
[model-Symbol-Fg]=${GBT_CAR_OS_SYMBOL_FG:-${GBT_CAR_OS_FG:-${GBT__OS_SYMBOLS["${os}_color"]}}}
@@ -77,6 +77,6 @@ function GbtCarOs() {

[display]=${GBT_CAR_OS_DISPLAY:-1}
[wrap]=${GBT_CAR_OS_WRAP:-0}
[sep]=${GBT_CAR_OS_SEP:-'\x00'}
[sep]=${GBT_CAR_OS_SEP-'\x00'}
)
}
@@ -3,25 +3,25 @@ function GbtCarPyVirtEnv() {
local defaultRootFg=${GBT_CAR_FG:-black}
local defaultRootFm=${GBT_CAR_FM:-none}

GbtDecorateUnicode ${GBT_CAR_PYVIRTENV_NAME_TEXT:-'\xee\x9c\xbc'}
GbtDecorateUnicode ${GBT_CAR_PYVIRTENV_NAME_TEXT-'\xee\x9c\xbc'}
local defaultIconText=$GBT__RETVAL

GBT_CAR=(
[model-root-Bg]=${GBT_CAR_PYVIRTENV_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_PYVIRTENV_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_PYVIRTENV_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_PYVIRTENV_FORMAT:-' {{ Icon }} {{ Name }} '}
[model-root-Text]=${GBT_CAR_PYVIRTENV_FORMAT-' {{ Icon }} {{ Name }} '}
[model-Icon-Bg]=${GBT_CAR_PYVIRTENV_ICON_BG:-${GBT_CAR_PYVIRTENV_BG:-$defaultRootBg}}
[model-Icon-Fg]=${GBT_CAR_PYVIRTENV_ICON_FG:-${GBT_CAR_PYVIRTENV_FG:-33}}
[model-Icon-Fm]=${GBT_CAR_PYVIRTENV_ICON_FM:-${GBT_CAR_PYVIRTENV_FM:-$defaultRootFm}}
[model-Icon-Text]=$defaultIconText
[model-Name-Bg]=${GBT_CAR_PYVIRTENV_NAME_BG:-${GBT_CAR_PYVIRTENV_BG:-$defaultRootBg}}
[model-Name-Fg]=${GBT_CAR_PYVIRTENV_NAME_FG:-${GBT_CAR_PYVIRTENV_FG:-$defaultRootFg}}
[model-Name-Fm]=${GBT_CAR_PYVIRTENV_NAME_FM:-${GBT_CAR_PYVIRTENV_FM:-$defaultRootFm}}
[model-Name-Text]=${GBT_CAR_PYVIRTENV_NAME_TEXT:-${VIRTUAL_ENV##/*/}}
[model-Name-Text]=${GBT_CAR_PYVIRTENV_NAME_TEXT-${VIRTUAL_ENV##/*/}}

[wrap]=${GBT_CAR_PYVIRTENV_WRAP:-0}
[sep]=${GBT_CAR_PYVIRTENV_SEP:-'\x00'}
[sep]=${GBT_CAR_PYVIRTENV_SEP-'\x00'}
)

if [ -n "$VIRTUAL_ENV" ]; then
@@ -13,25 +13,25 @@ function GbtCarSign() {
[model-root-Bg]=${GBT_CAR_SIGN_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_SIGN_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_SIGN_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_SIGN_FORMAT:-' {{ Symbol }} '}
[model-root-Text]=${GBT_CAR_SIGN_FORMAT-' {{ Symbol }} '}

[model-Symbol-Bg]=${GBT_CAR_SIGN_SYMBOL_BG:-${GBT_CAR_SIGN_BG:-$defaultRootBg}}
[model-Symbol-Fg]=${GBT_CAR_SIGN_SYMBOL_FG:-${GBT_CAR_SIGN_FG:-green}}
[model-Symbol-Fm]=${GBT_CAR_SIGN_SYMBOL_FM:-${GBT_CAR_SIGN_FM:-bold}}
[model-Symbol-Text]=${GBT_CAR_SIGN_SYMBOL_FORMAT:-$symbolFormat}
[model-Symbol-Text]=${GBT_CAR_SIGN_SYMBOL_FORMAT-$symbolFormat}

[model-User-Bg]=${GBT_CAR_SIGN_USER_BG:-${GBT_CAR_SIGN_BG:-$defaultRootBg}}
[model-User-Fg]=${GBT_CAR_SIGN_USER_FG:-light_green}
[model-User-Fm]=${GBT_CAR_SIGN_USER_FM:-${GBT_CAR_SIGN_FM:-bold}}
[model-User-Text]=${GBT_CAR_SIGN_USER_TEXT:-'$'}
[model-User-Text]=${GBT_CAR_SIGN_USER_TEXT-'$'}

[model-Admin-Bg]=${GBT_CAR_SIGN_ADMIN_BG:-${GBT_CAR_SIGN_BG:-$defaultRootBg}}
[model-Admin-Fg]=${GBT_CAR_SIGN_ADMIN_FG:-red}
[model-Admin-Fm]=${GBT_CAR_SIGN_ADMIN_FM:-${GBT_CAR_SIGN_FM:-bold}}
[model-Admin-Text]=${GBT_CAR_SIGN_ADMIN_TEXT:-'#'}
[model-Admin-Text]=${GBT_CAR_SIGN_ADMIN_TEXT-'#'}

[display]=${GBT_CAR_SIGN_DISPLAY:-1}
[wrap]=${GBT_CAR_SIGN_WRAP:-0}
[sep]=${GBT_CAR_SIGN_SEP:-'\x00'}
[sep]=${GBT_CAR_SIGN_SEP-'\x00'}
)
}
@@ -51,9 +51,9 @@ function GbtCarStatus() {
local defaultRootFg=$defaultErrorFg
local defaultRootFm=$defaultErrorFm

GbtDecorateUnicode ${GBT_CAR_STATUS_ERROR_TEXT:-'\xe2\x9c\x98'}
GbtDecorateUnicode ${GBT_CAR_STATUS_ERROR_TEXT-'\xe2\x9c\x98'}
local defaultErrorText=$GBT__RETVAL
GbtDecorateUnicode ${GBT_CAR_STATUS_OK_TEXT:-'\xe2\x9c\x94'}
GbtDecorateUnicode ${GBT_CAR_STATUS_OK_TEXT-'\xe2\x9c\x94'}
local defaultOkText=$GBT__RETVAL

local defaultDetailsFormat=' {{ Signal }}'
@@ -71,14 +71,14 @@ function GbtCarStatus() {
defaultDetailsFormat=''
defaultSymbolFormat='{{ Ok }}'
else
defaultDetailsFormat=${GBT_CAR_STATUS_DETAILS_FORMAT:-$defaultDetailsFormat}
defaultDetailsFormat=${GBT_CAR_STATUS_DETAILS_FORMAT-$defaultDetailsFormat}
fi

GBT_CAR=(
[model-root-Bg]=${GBT_CAR_STATUS_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_STATUS_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_STATUS_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_STATUS_FORMAT:-' {{ Symbol }} '}
[model-root-Text]=${GBT_CAR_STATUS_FORMAT-' {{ Symbol }} '}

[model-Error-Bg]=${GBT_CAR_STATUS_ERROR_BG:-${GBT_CAR_STATUS_SYMBOL_BG:-${GBT_CAR_STATUS_BG:-$defaultErrorBg}}}
[model-Error-Fg]=${GBT_CAR_STATUS_ERROR_FG:-${GBT_CAR_STATUS_SYMBOL_FG:-${GBT_CAR_STATUS_FG:-$defaultErrorFg}}}
@@ -93,7 +93,7 @@ function GbtCarStatus() {
[model-Symbol-Bg]=${GBT_CAR_STATUS_SYMBOL_BG:-${GBT_CAR_STATUS_BG:-$defaultRootBg}}
[model-Symbol-Fg]=${GBT_CAR_STATUS_SYMBOL_FG-${GBT_CAR_STATUS_FG:-$defaultRootFg}}
[model-Symbol-Fm]=${GBT_CAR_STATUS_SYMBOL_FM:-${GBT_CAR_STATUS_FM:-$defaultRootFm}}
[model-Symbol-Text]=${GBT_CAR_STATUS_SYMBOL_FORMAT:-$defaultSymbolFormat}
[model-Symbol-Text]=${GBT_CAR_STATUS_SYMBOL_FORMAT-$defaultSymbolFormat}

[model-Details-Bg]=${GBT_CAR_STATUS_DETAILS_BG:-${GBT_CAR_STATUS_BG:-$defaultDetailsBg}}
[model-Details-Fg]=${GBT_CAR_STATUS_DETAILS_FG:-${GBT_CAR_STATUS_FG:-$defaultDetailsFg}}
@@ -103,15 +103,15 @@ function GbtCarStatus() {
[model-Code-Bg]=${GBT_CAR_STATUS_CODE_BG:-${GBT_CAR_STATUS_BG:-$defaultRootBg}}
[model-Code-Fg]=${GBT_CAR_STATUS_CODE_FG:-${GBT_CAR_STATUS_FG:-$defaultRootFg}}
[model-Code-Fm]=${GBT_CAR_STATUS_CODE_FM:-${GBT_CAR_STATUS_FM:-$defaultRootFm}}
[model-Code-Text]=${GBT_CAR_STATUS_CODE_TEXT:-$defaultCodeText}
[model-Code-Text]=${GBT_CAR_STATUS_CODE_TEXT-$defaultCodeText}

[model-Signal-Bg]=${GBT_CAR_STATUS_SIGNAL_BG:-${GBT_CAR_STATUS_BG:-$defaultRootBg}}
[model-Signal-Fg]=${GBT_CAR_STATUS_SIGNAL_FG:-${GBT_CAR_STATUS_FG:-$defaultRootFg}}
[model-Signal-Fm]=${GBT_CAR_STATUS_SIGNAL_FM:-${GBT_CAR_STATUS_FM:-$defaultRootFm}}
[model-Signal-Text]=${GBT_CAR_STATUS_SIGNAL_TEXT:-${GBT__STATUS_SIGNALS[$defaultCodeText]:-UNK}}
[model-Signal-Text]=${GBT_CAR_STATUS_SIGNAL_TEXT-${GBT__STATUS_SIGNALS[$defaultCodeText]:-UNK}}

[wrap]=${GBT_CAR_STATUS_WRAP:-0}
[sep]=${GBT_CAR_STATUS_SEP:-'\x00'}
[sep]=${GBT_CAR_STATUS_SEP-'\x00'}
)

if [[ $1 == 0 ]]; then
@@ -27,21 +27,21 @@ function GbtCarTime() {
local defaultRootFg=${GBT_CAR_FG:-light_gray}
local defaultRootFm=${GBT_CAR_FM:-none}

GbtCarTimeFormat "${GBT_CAR_TIME_DATE_FORMAT:-Mon 02 Jan}"
GbtCarTimeFormat "${GBT_CAR_TIME_DATE_FORMAT-Mon 02 Jan}"
local defaultDateText=$(${GBT__SOURCE_DATE:-date} "+$GBT__RETVAL")
GbtCarTimeFormat "${GBT_CAR_TIME_TIME_FORMAT:-15:04:05}"
GbtCarTimeFormat "${GBT_CAR_TIME_TIME_FORMAT-15:04:05}"
local defaultTimeText=$(${GBT__SOURCE_DATE:-date} "+$GBT__RETVAL")

GBT_CAR=(
[model-root-Bg]=${GBT_CAR_TIME_BG:-$defaultRootBg}
[model-root-Fg]=${GBT_CAR_TIME_FG:-$defaultRootFg}
[model-root-Fm]=${GBT_CAR_TIME_FM:-$defaultRootFm}
[model-root-Text]=${GBT_CAR_TIME_FORMAT:-' {{ DateTime }} '}
[model-root-Text]=${GBT_CAR_TIME_FORMAT-' {{ DateTime }} '}

[model-DateTime-Bg]=${GBT_CAR_TIME_DATETIME_BG:-${GBT_CAR_TIME_BG:-$defaultRootBg}}
[model-DateTime-Fg]=${GBT_CAR_TIME_DATETIME_FG:-${GBT_CAR_TIME_FG:-$defaultRootFg}}
[model-DateTime-Fm]=${GBT_CAR_TIME_DATETIME_FM:-${GBT_CAR_TIME_FM:-$defaultRootFm}}
[model-DateTime-Text]=${GBT_CAR_TIME_DATETIME_FORMAT:-'{{ Date }} {{ Time }}'}
[model-DateTime-Text]=${GBT_CAR_TIME_DATETIME_FORMAT-'{{ Date }} {{ Time }}'}

[model-Date-Bg]=${GBT_CAR_TIME_DATE_BG:-${GBT_CAR_TIME_DATETIME_FG:-${GBT_CAR_TIME_BG:-$defaultRootBg}}}
[model-Date-Fg]=${GBT_CAR_TIME_DATE_FG:-${GBT_CAR_TIME_DATETIME_BG:-${GBT_CAR_TIME_FG:-$defaultRootFg}}}
@@ -55,6 +55,6 @@ function GbtCarTime() {

[display]=${GBT_CAR_TIME_DISPLAY:-1}
[wrap]=${GBT_CAR_TIME_WRAP:-0}
[sep]=${GBT_CAR_TIME_SEP:-'\x00'}
[sep]=${GBT_CAR_TIME_SEP-'\x00'}
)
}

0 comments on commit c02a775

Please sign in to comment.
You can’t perform that action at this time.