summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/mailsync3
-rwxr-xr-xbin/mw14
-rw-r--r--share/domains.csv1
-rw-r--r--share/mailcap2
-rw-r--r--share/mutt-wizard.muttrc2
5 files changed, 14 insertions, 8 deletions
diff --git a/bin/mailsync b/bin/mailsync
index ca7411d..e939b78 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -23,7 +23,8 @@ pgrep mbsync >/dev/null && { echo "mbsync is already running."; exit ;}
eval "$(grep -h -- \
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \
- "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" "$HOME/.pam_environment" 2>/dev/null)"
+ "$HOME/.config/zsh/.zshenv" "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" \
+ "$HOME/.pam_environment" 2>/dev/null)"
export GPG_TTY="$(tty)"
diff --git a/bin/mw b/bin/mw
index d3129e7..26d2e49 100755
--- a/bin/mw
+++ b/bin/mw
@@ -308,23 +308,27 @@ To change an account's password, run \`pass edit your@email.com\`.
EOF
}
-reorder(){
+reorder() {
tempfile="$(mktemp -u)"
trap 'rm -f $tempfile' HUP INT QUIT TERM PWR EXIT
- echo "# Carefully reorder these accounts with the desired numbers." > "$tempfile"
+ echo "# Carefully reorder these accounts with the desired numbers in the first column.
+# DO NOT reorder rows or rename the accounts in the second column." > "$tempfile"
sed -n "
/ i[0-9] / s?\(.* i\|'<sync.*/\|\.muttrc.*\)??g p
- " "$muttrc" > "$tempfile"
+ " "$muttrc" >> "$tempfile"
${EDITOR:-vim} "$tempfile" || exit 1
+ sed -i -e 's/#.*//' -e '/^$/d' "$tempfile"
default="$(sort -n "$tempfile" | head -n 1)"
default="${default#* }"
- sed -ibu "/.* i[0-9] .*.muttrc/d" "$muttrc" 2>/dev/null; rm -f "$muttrc"bu
+ sed -ibu "
+ /.* i[0-9] .*.muttrc/d
+ /^source.*accounts.*.muttrc/d
+ " "$muttrc" 2>/dev/null; rm -f "$muttrc"bu
awk -v a="$accdir" -v d="$default" ' BEGIN { print "source "a"/"d".muttrc" }
{
print "macro index,pager i"$1" '\''<sync-mailbox><enter-command>source "a"/"$2".muttrc<enter><change-folder>!<enter>;<check-stats>'\'' \"switch to "$2"\""
}
' "$tempfile" >> "$muttrc"
-
}
while getopts "rfpPXlhodTYD:y:i:I:s:S:u:a:n:x:m:t:" o; do case "${o}" in
diff --git a/share/domains.csv b/share/domains.csv
index 99517cc..1cca410 100644
--- a/share/domains.csv
+++ b/share/domains.csv
@@ -274,6 +274,7 @@ tecnico.ulisboa.pt,mail.tecnico.ulisboa.pt,993,mail.tecnico.ulisboa.pt,465
teknik.io,mail.teknik.io,993,mail.teknik.io,587
telenet.be,imap.telenet.be,993,smtp.telenet.be,587
tfwno.gf,mail.cock.li,993,mail.cock.li,587
+thamognya.com,mail.thamognya.com,993,mail.thamognya.com,587
thunix.net,thunix.net,143,thunix.net,25
tlen.pl,poczta.o2.pl,993,poczta.o2.pl,465
tlu.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
diff --git a/share/mailcap b/share/mailcap
index b355f32..a49145f 100644
--- a/share/mailcap
+++ b/share/mailcap
@@ -1,6 +1,6 @@
text/plain; $EDITOR %s ;
text/html; openfile %s ; nametemplate=%s.html
-text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
+text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput;
image/*; openfile %s ;
video/*; setsid mpv --quiet %s &; copiousoutput
audio/*; mpv %s ;
diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc
index a12a77e..f99d74d 100644
--- a/share/mutt-wizard.muttrc
+++ b/share/mutt-wizard.muttrc
@@ -3,7 +3,7 @@
# mutt-wizard will have this file sourced from your muttrc.
# In the interest of seamless updating, do not edit this file.
# If you want to override any settings, set those in your muttrc.
-set mailcap_path = /usr/local/share/mutt-wizard/mailcap:$mailcap_path
+set mailcap_path = $HOME/.config/mutt/mailcap:/usr/local/share/mutt-wizard/mailcap:$mailcap_path
set mime_type_query_command = "file --mime-type -b %s"
set date_format="%y/%m/%d %I:%M%p"
set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"