initial commit

This commit is contained in:
2026-03-11 22:17:07 +01:00
commit 091b3a1a96
10 changed files with 350 additions and 0 deletions

17
src/sh/awk.sh Normal file
View File

@@ -0,0 +1,17 @@
if [ ! "${AWK_LOADED:-}" ]; then
AWK_LASTMESSAGEINTHREAD=$(
cat <<'EOF'
@@include awk/lastmessageinthread.awk
EOF
)
export AWK_LASTMESSAGEINTHREAD
AWK_THREADOVERVIEW=$(
cat <<'EOF'
@@include awk/threadoverview.awk
EOF
)
export AWK_THREADOVERVIEW
export AWK_LOADED=1
fi

11
src/sh/info.sh Normal file
View File

@@ -0,0 +1,11 @@
# Application information
if [ ! "${INFO_LOADED:-}" ]; then
APP_NAME="nmf"
APP_VERSION="0.1"
APP_WEBSITE="https://git.indyfac.ch/amin/not-much-fuzz/"
WINDOW_TITLE="📨 $APP_NAME | not much fuzz"
export APP_NAME APP_VERSION APP_WEBSITE WINDOW_TITLE
export INFO_LOADED=1
fi

13
src/sh/theme.sh Normal file
View File

@@ -0,0 +1,13 @@
# Default theme
if [ ! "${THEME_LOADED:-}" ]; then
COLDATE="$(printf '\033[38;5;195m')"
COLCNTS="$(printf '\033[38;5;244m')"
COLFROM="$(printf '\033[38;5;208m')"
COLSUBJ="$(printf '\033[38;5;179m\033[3m')"
COLTAGS="$(printf '\033[38;5;106m\033[2m')"
RESET="$(printf '\033[0m')"
export COLDATE COLCNTS COLFROM COLSUBJ COLTAGS
export THEME_LOADED=1
fi

28
src/sh/tools.sh Normal file
View File

@@ -0,0 +1,28 @@
if [ ! "${TOOLS_LOADED:-}" ]; then
if command -v "fzf" >/dev/null; then
FZF="fzf --black --ansi --cycle --tiebreak=chunk,index"
else
err "Did not find the command-line fuzzy finder fzf."
exit 1
fi
export FZF
if command -v "notmuch" >/dev/null; then
NOTMUCH="notmuch"
else
err "Did not find the command-line email system notmuch."
exit 1
fi
export NOTMUCH
if command -v "bat" >/dev/null; then
CAT="bat"
elif command -v "batcat" >/dev/null; then
CAT="batcat"
fi
CAT=${CAT:+$CAT -l email --style=plain --color=always --wrap}
CAT=${CAT:-cat}
export CAT
export TOOLS_LOADED=1
fi