improvement: styles in theme file, and new exports

This commit is contained in:
2025-06-18 16:35:26 +02:00
parent 3b8c412885
commit a79dfc575e
11 changed files with 119 additions and 52 deletions

View File

@@ -20,15 +20,16 @@ if [ -z "${ROOT:-}" ] || [ -z "${COLLECTION_LABELS:-}" ]; then
err "Configuration is incomplete."
exit 1
fi
SYNC_CMD=${SYNC_CMD:-echo 'Synchronization disabled'}
DAY_START=${DAY_START:-8}
DAY_END=${DAY_END:-18}
ZI_DIR=${ZI_DIR:-/usr/share/zoneinfo/posix}
export ROOT COLLECTION_LABELS
export SYNC_CMD=${SYNC_CMD:-echo 'Synchronization disabled'}
export DAY_START=${DAY_START:-8}
export DAY_END=${DAY_END:-18}
export ZI_DIR=${ZI_DIR:-/usr/share/zoneinfo/posix}
if [ ! -d "$ZI_DIR" ]; then
err "Could not determine time-zone information"
exit 1
fi
OPEN=${OPEN:-open}
export OPEN=${OPEN:-open}
# Check and load required tools
# - FZF: Fuzzy finder `fzf``
@@ -39,14 +40,14 @@ OPEN=${OPEN:-open}
# The presence of POSIX tools is not checked.
if command -v "fzf" >/dev/null; then
FZF="fzf --black"
export FZF="fzf --black"
else
err "Did not find the command-line fuzzy finder fzf."
exit 1
fi
if command -v "uuidgen" >/dev/null; then
UUIDGEN="uuidgen"
export UUIDGEN="uuidgen"
else
err "Did not find the uuidgen command."
exit 1
@@ -58,8 +59,8 @@ elif command -v "batcat" >/dev/null; then
CAT="batcat"
fi
CAT=${CAT:+$CAT --color=always --style=numbers --language=md}
CAT=${CAT:-cat}
export CAT=${CAT:-cat}
if command -v "git" >/dev/null && [ -d "$ROOT/.git" ]; then
GIT="git -C $ROOT"
export GIT="git -C $ROOT"
fi