imprv: colors

This commit is contained in:
2026-03-12 08:17:19 +01:00
parent 7653f052b7
commit 3210a8bbcf
3 changed files with 28 additions and 22 deletions

View File

@@ -73,9 +73,8 @@ FZF_DEFAULT_THREAD_LINE="{1} {3} ({4})"
if [ "${1:-}" = "--show-thread" ]; then
shift
thread="$1"
res=$(__notmuch_thread "$thread" | fzf \
res=$(__notmuch_thread "$thread" | $FZF \
--raw \
--ansi \
--reverse \
--multi \
--delimiter="$(printf '\t')" \
@@ -106,9 +105,8 @@ CMD_EDIT_QUERY="edit-query"
while true; do
nmquery="${nmquery:-tag:inbox}"
[ "$(tail -1 "$NMFHIST")" = "$nmquery" ] || echo "$nmquery" >> "$NMFHIST"
cmd=$(__notmuch_search "$nmquery" | fzf \
cmd=$(__notmuch_search "$nmquery" | $FZF \
--header="Query: $nmquery" \
--ansi \
--tiebreak=index \
--reverse \
--multi \
@@ -131,32 +129,33 @@ while true; do
[ -n "$cmd" ] || exit 0
case "$cmd" in
$CMD_SEARCH_TAG*)
tag=$(__notmuch_list_tags | fzf \
--ansi \
--cycle \
tag=$(__notmuch_list_tags | $FZF \
--color="border:$ANSICOLORTAGS" \
--color="label:$ANSICOLORTAGS" \
--tac \
--bind='ctrl-d:half-page-down,ctrl-u:half-page-up' \
--margin='20%' \
--bind='enter:accept-or-print-query' \
--border=double \
--border-label='Select tag' || true)
--border-label=" Select tag " || true)
[ -n "$tag" ] || continue
[ "$cmd" = "$CMD_SEARCH_TAG$APPEND" ] && nmquery="$nmquery and tag:$tag" || nmquery="tag:$tag"
;;
$CMD_SEARCH_ADDRESS*)
case "$cmd" in
*$ADDRESS_FROM*)
label_text='Select sender'
label_text=" Select sender "
field='from'
;;
*)
label_text='Select recipient'
label_text=" Select recipient "
field='to'
;;
esac
address=$(__notmuch_list_address | fzf \
--ansi \
address=$(__notmuch_list_address | $FZF \
--color="border:$ANSICOLORFROM" \
--color="label:$ANSICOLORFROM" \
--tiebreak=index \
--cycle \
--bind='ctrl-d:half-page-down,ctrl-u:half-page-up' \
--margin='20%' \
--bind='enter:accept-or-print-query' \
@@ -173,8 +172,9 @@ while true; do
esac
;;
$CMD_EDIT_QUERY*)
nmquery=$(fzf \
--ansi \
nmquery=$($FZF \
--color="border:$ANSICOLORSUBJ" \
--color="label:$ANSICOLORSUBJ" \
--tac \
--bind='ctrl-d:half-page-down,ctrl-u:half-page-up' \
--margin='20%' \
@@ -184,7 +184,7 @@ while true; do
--prompt="Query: " \
--bind='focus:replace-query' \
--border=double \
--border-label='Query history' < "$NMFHIST" | head -1 || true)
--border-label=' Query history ' < "$NMFHIST" | head -1 || true)
;;
*)
;;