From: martin f. krafft Date: Sun, 27 Aug 2023 02:41:53 +0000 (+1200) Subject: add siby alternate X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/HEAD?hp=94698af38a3a5aa4d3dc3cbfe6aafb440dee8714;ds=sidebyside add siby alternate --- diff --git a/.config/mutt/ack-recipients b/.config/mutt/ack-recipients index 8334a45..f010acd 100644 --- a/.config/mutt/ack-recipients +++ b/.config/mutt/ack-recipients @@ -20,3 +20,4 @@ d76070145d21ec707f12b834c24aee6ec35c628b636d6e1606172c65a373b0e3 07979ca17b8706b2c3fbfb744dad1d057d098aa3be0e2b325fe6e4024b310d29 3d66a23f23b70f1838369c8292cddc3a50e5ebb6ae3cb41a6c2ef8354a913814 615aa8482f524f9c66696ebd4bb5bb7836e2819c63313be2c067a4f9a0d546cc +b92544617b44d0058ac3bbb01dad4fed076f1c926edce41d02bbd60e0a110cdd diff --git a/.config/mutt/alternates b/.config/mutt/alternates index dbc93a8..b67426a 100644 --- a/.config/mutt/alternates +++ b/.config/mutt/alternates @@ -28,9 +28,11 @@ alternates .+@tahi-ventures\.(cc|ch|com|de|eu|info|net|org) alternates .+@tahi\.(vc|cc|kiwi\.nz|ventures) alternates .+@grounded.ventures alternates .+@portfolio\.tahi\.v(c|entures) -alternates martin@keyp\.io alternates m@rtin\.kiwi -alternates squash(tc|news)@thorndonclub\.co\.nz +alternates .+@(.+\.)?nymphenburg-squash\.de #alternates .+@(rw|int|home)\.madduck\.net +alternates .+@penny[au]ndmartin\.net +alternates martin\.krafft@toni(\.immo|-kg\.de) +alternates martin@squash-in-bayern\.de # vim:ft=muttrc diff --git a/.config/mutt/icalparser b/.config/mutt/icalparser index 50ed472..ee46e61 100755 --- a/.config/mutt/icalparser +++ b/.config/mutt/icalparser @@ -25,19 +25,24 @@ def dtstrs(event): return dt.astimezone().strftime(strf) ret = [] - if start.tzinfo == end.tzinfo: - ret.append(strftime(start, '%F %R')) - else: - ret.append(strftime(start, '%F %R %Z')) + try: + if start.tzinfo == end.tzinfo: + ret.append(strftime(start, '%F %R')) - if start.date() == end.date(): - ret.append(strftime(end, '%T %Z')) + else: + ret.append(strftime(start, '%F %R %Z')) - else: - ret.append(strftime(end, '%F %R %Z')) + if start.date() == end.date(): + ret.append(strftime(end, '%T %Z')) + + else: + ret.append(strftime(end, '%F %R %Z')) + + return ret - return ret + except AttributeError: + return map(lambda d: d.strftime('%F'), (start, end)) def parse_ics_file(fp): cal = Calendar.from_ical(fp.read()) diff --git a/.config/mutt/keybindings b/.config/mutt/keybindings index a3cafa9..d8f3484 100644 --- a/.config/mutt/keybindings +++ b/.config/mutt/keybindings @@ -82,6 +82,7 @@ macro index,pager M " set my_weed=\$weed se macro index,pager " set my_pipe_decode=\$pipe_decode unset pipe_decode$my_confdir/viewmailattachments set pipe_decode=\$my_pipe_decode" "view attachments in browser" macro compose \ez " set my_editor=\$editor set editor='mogrify -sample 1000x1000' set editor=\$my_editor" "Resize attached image to within 1000x1000" +macro compose \eZ " set my_editor=\$editor set editor='mogrify -sample 2500x2500' set editor=\$my_editor" "Resize attached image to within 1000x1000" bind index,pager sidebar-prev bind index,pager \e sidebar-prev diff --git a/.config/mutt/list-mailboxes b/.config/mutt/list-mailboxes index 497a253..d0bb5d5 100755 --- a/.config/mutt/list-mailboxes +++ b/.config/mutt/list-mailboxes @@ -1,6 +1,15 @@ #!/bin/sh +if [ -f $VARDIR/offlineimap/mailboxes ]; then + sed 1d $VARDIR/offlineimap/mailboxes +fi + find "$1/" -type d -name cur -printf '%h\n' | \ sed -e "s,^$1/,=,g" -e "s,^$1\$,$2," | \ - egrep -v '^=(sp(ool|am)|discard|retrain(/(sp|h)am)?)$' | \ - sort | xargs echo mailboxes + egrep -v '^=(sp(ool|am)|discard|retrain(/(sp|h)am)?)$' | sort | \ +while read mailbox; do + + ! grep -q "^mailboxes ${mailbox}\$" $VARDIR/offlineimap/mailboxes || continue + echo "mailboxes $mailbox" + +done diff --git a/.config/mutt/mailcap.icalendar b/.config/mutt/mailcap.icalendar index 2c13a19..8f6f059 100644 --- a/.config/mutt/mailcap.icalendar +++ b/.config/mutt/mailcap.icalendar @@ -2,6 +2,6 @@ # Mutt mailcap for iCalendar previewing/khal import text/calendar; ~/.config/mutt/icalparser; description=iCal details; copiousoutput; \ - print=khal import '%s' + print=sh -c "sensible-editor '%s' && khal import '%s'"; application/ics; ~/.config/mutt/icalparser; description=iCal details; copiousoutput; \ - print=khal import '%s' + print=sh -c "sensible-editor '%s' && khal import '%s'"; diff --git a/.config/mutt/markdown2html b/.config/mutt/markdown2html index 327dff2..3762d5f 100755 --- a/.config/mutt/markdown2html +++ b/.config/mutt/markdown2html @@ -51,6 +51,7 @@ DEFAULT_CSS += ''' .block { padding: 0 0.5em; margin: 0; + font-style: italic; border-left: 2px solid #eee; } .quote, blockquote { @@ -104,7 +105,10 @@ if os.path.exists(STYLESHEET): DEFAULT_CSS += open(STYLESHEET).read() SIGNATURE_HTML = \ - '
-- {sig}
' +""" +
--
+{sig}
+""" def _preprocess_signature(sig): @@ -250,7 +254,8 @@ def _convert_with_pandoc(mdwn, inputfmt='markdown', outputfmt='html5', ext_disabled = [ 'tex_math_single_backslash', 'tex_math_dollars', 'smart', - 'raw_html' + 'raw_html', + 'yaml_metadata_block' ] enabled = '+'.join(ext_enabled) @@ -304,15 +309,14 @@ def convert_markdown_to_html(mdwn): body = _preprocess_markdown(body) body = _identify_quotes_for_later(body) html = _convert_with_pandoc(body, standalone=True, selfcontained=True, - title="Body") - html = html.replace('Body\n','') + title=None) html = _reformat_quotes(html) if sig: sig = _preprocess_signature(sig) sig = _preprocess_markdown(sig) sig = _convert_with_pandoc(sig, standalone=False, selfcontained=False, - title="Signature") + title=None) sig = SIGNATURE_HTML.format(sig=sig) eob = html.find('') html = f'{html[:eob]}{sig}\n{html[eob:]}'