aerc-wizard

aerc and isync auto-configuration
git clone https://git.awy.one/aerc-wizard
Log | Files | Refs | README | LICENSE

commit 0f0b25533cf78694f0ec5b7d72c993154ed7c696
parent 596c835a05ec98c23cf04be83ddfa344a7da4319
Author: awy <awy@awy.one>
Date:   Tue, 23 Dec 2025 23:08:33 +0300

use basic aerc.conf if there is none

Diffstat:
Mbin/aew | 4++++
Ashare/aerc-conf | 34++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/bin/aew b/bin/aew @@ -8,6 +8,7 @@ muttshare="$prefix/share/aerc-wizard" cachedir="${XDG_CACHE_HOME:-$HOME/.cache}/aerc-wizard" muttrc="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc" aercdir="${XDG_CONFIG_HOME:-$HOME/.config}/aerc" +aercconf="$aercdir/aerc.conf" accountsconf="$aercdir/accounts.conf" accdir="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/accounts" msmtprc="${XDG_CONFIG_HOME:-$HOME/.config}/msmtp/config" @@ -20,6 +21,7 @@ mbsynctemp="$muttshare/mbsync-temp" mbsyncgmailtemp="$muttshare/mbsync-gmail-temp" aerctemp="$muttshare/aerc-temp" aercbase="$muttshare/aerc-base" +aerctempconf="$muttshare/aerc-conf" msmtptemp="$muttshare/msmtp-temp" onlinetemp="$muttshare/online-temp" notmuchtemp="$muttshare/notmuch-temp" @@ -104,9 +106,11 @@ prepaerc() { mkdir -p "$aercdir" aercuser="${fulladdr%@*}" aercdomain="${fulladdr#*@}" + [ ! -f "$aercconf" ] && cat "$aerctempconf" >"$aercconf" [ ! -f "$accountsconf" ] && envsubst <"$aercbase" >"$accountsconf" ! grep -q "^multi-file-strategy" "$accountsconf" && envsubst <"$aercbase" >"$accountsconf" envsubst <"$aerctemp" >>"$accountsconf" + chmod 600 "$accountsconf" } getprofiles() { diff --git a/share/aerc-conf b/share/aerc-conf @@ -0,0 +1,34 @@ +[general] + +[ui] +styleset-name=gruvbox-dark +fuzzy-complete=true +icon-new=✨ +icon-old=✨ +icon-attachment=📎 +icon-replied=📝 +icon-flagged=🚩 +icon-deleted=🗑️ + +[statusline] + +[viewer] +alternatives=text/plain,text/html + +[compose] + +[multipart-converters] + +[filters] +text/plain=colorize +text/calendar=calendar +message/delivery-status=colorize +message/rfc822=colorize +text/html=! html +.headers=colorize + +[openers] + +[hooks] + +[templates]