diff options
author | EuAndreh <eu@euandre.org> | 2022-10-29 16:25:04 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-10-29 16:25:04 -0300 |
commit | b8ed775bcdec7d8766ae000534ccda867601e8c3 (patch) | |
tree | 95966335512472cfb9a032548c9983407a68b54e /bin | |
parent | etc/guix/home.scm: Setup poweralertd-service-type (diff) | |
download | dotfiles-b8ed775bcdec7d8766ae000534ccda867601e8c3.tar.gz dotfiles-b8ed775bcdec7d8766ae000534ccda867601e8c3.tar.xz |
bin/mailcfg: Use PascalCase label over lowercase normalized one
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/email | 2 | ||||
-rwxr-xr-x | bin/mailcfg | 12 |
2 files changed, 9 insertions, 5 deletions
@@ -70,4 +70,4 @@ eval "$(assert-arg "${1:-}" 'ADDRESS')" printf 'Content-Type: text/plain; charset=UTF-8\nSubject: %s\n\n%s' \ "$(echo "$SUBJECT" | tr -d '\n')" \ "$(cat)" | - msmtpq -a euandreh "$@" + msmtpq -a EuAndreh "$@" diff --git a/bin/mailcfg b/bin/mailcfg index ea53a31..86aab17 100755 --- a/bin/mailcfg +++ b/bin/mailcfg @@ -37,6 +37,7 @@ help() { One of the files also needs to define: - $DEFAULT_NAME - $DEFAULT_ADDR + - $DEFAULT_LABEL An example of such file could be "30-andre@work.com.env": @@ -161,7 +162,7 @@ msmtp() { cat <<-EOF - account default : $DEFAULT_LABEL_LC + account default : $DEFAULT_LABEL EOF } @@ -209,7 +210,10 @@ notmuchhook() { LABELS="$LABELS $LABEL" fi done - sed "s|@DIRS@|$LABELS|g" "$CFGDIR"/post-new + sed \ + -e "s|@DIRS@|$LABELS|g" \ + -e "s|@DEFAULT_LABEL@|$DEFAULT_LABEL|g" \ + "$CFGDIR"/post-new } alot() { @@ -256,10 +260,10 @@ alot() { for env in "$CFGDIR"/*.env; do . "$env" cat <<-EOF - [[$LABEL_LC]] + [[$LABEL]] realname = $NAME address = $ADDR - sendmail_command = msmtpq --account=$LABEL_LC -t + sendmail_command = msmtpq --account=$LABEL -t sent_box = maildir://~/Maildir/$LABEL/Sent draft_box = maildir://~/Maildir/$LABEL/Drafts gpg_key = 5BDAE9B8B2F6C6BCBB0D6CE581F90EC3CD356060 |