From e5bf8ec348612bba14bc537bbed586af07c6e430 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Tue, 16 Mar 2021 00:37:51 +0100 Subject: [PATCH] feat: xdg base directories for abook --- .config/aliasrc | 1 + .config/mutt/neomutt.muttrc | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/aliasrc b/.config/aliasrc index 0056836..0bd81a9 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -18,3 +18,4 @@ alias @webapps='ssh p1926178@192.168.75.57' alias @projet='ssh p1926178@192.168.74.198' alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' alias abcde='abcde -c $XDG_CONFIG_HOME/abcde/config' +alias abook='abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook' diff --git a/.config/mutt/neomutt.muttrc b/.config/mutt/neomutt.muttrc index a448f1d..cda4fb4 100644 --- a/.config/mutt/neomutt.muttrc +++ b/.config/mutt/neomutt.muttrc @@ -9,7 +9,9 @@ set date_format="%d/%m/%y %I:%M%p" set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" set sort = 'reverse-date' set smtp_authenticators = 'gssapi:login' -set query_command = "abook --mutt-query '%s'" +set my_abook = "abook --config /home/swytch/.config/abook/abookrc --datafile \ + /home/swytch/.local/share/abook/addressbook" +set query_command = "$my_abook --mutt-query '%s'" set rfc2047_parameters = yes set sleep_time = 0 # Pause 0 seconds for informational messages set markers = no # Disables the `+` displayed at line wraps @@ -70,7 +72,7 @@ bind editor complete-query #set pgp_self_encrypt = yes #set pgp_default_key = 'your@gpgemailaddre.ss' -macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" +macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decode$my_abook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to my_abook" macro index \Cr "T~UN." "mark all messages as read" macro index O "mbsync -a" "run mbsync -a to sync all mail" macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"" "show only messages matching a notmuch pattern"