]> git.madduck.net Git - etc/mutt.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add siby alternate master
authormartin f. krafft <madduck@madduck.net>
Sun, 27 Aug 2023 02:41:53 +0000 (14:41 +1200)
committermartin f. krafft <madduck@madduck.net>
Sun, 27 Aug 2023 02:41:53 +0000 (14:41 +1200)
.config/mutt/ack-recipients
.config/mutt/alternates
.config/mutt/icalparser
.config/mutt/keybindings
.config/mutt/list-mailboxes
.config/mutt/mailcap.icalendar
.config/mutt/markdown2html

index 8334a45789bf42d30c8e3b464426fa69359f738f..f010acdebb6b111e1c4698a09dd8c8cda849c972 100644 (file)
@@ -20,3 +20,4 @@ d76070145d21ec707f12b834c24aee6ec35c628b636d6e1606172c65a373b0e3
 07979ca17b8706b2c3fbfb744dad1d057d098aa3be0e2b325fe6e4024b310d29
 3d66a23f23b70f1838369c8292cddc3a50e5ebb6ae3cb41a6c2ef8354a913814
 615aa8482f524f9c66696ebd4bb5bb7836e2819c63313be2c067a4f9a0d546cc
+b92544617b44d0058ac3bbb01dad4fed076f1c926edce41d02bbd60e0a110cdd
index dbc93a86e85ade62a01b3a8f4eb89ac66b5d36db..b67426affdfde9807ca0c5951d28e659b4f11b88 100644 (file)
@@ -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
index 50ed4726865ec22c2525918a8fd5796f9df710ce..ee46e6153a211a04a850ee3a80f7c5db3a815062 100755 (executable)
@@ -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())
index a3cafa9644f27325cde150cf797f32428edb8d6e..d8f3484acb1ddd5278d73cbd113cdc24b31db578 100644 (file)
@@ -82,6 +82,7 @@ macro index,pager     M       "<enter-command> set my_weed=\$weed<enter><enter-command> se
 macro index,pager      <F10>   "<enter-command> set my_pipe_decode=\$pipe_decode<enter><enter-command> unset pipe_decode<enter><pipe-message>$my_confdir/viewmailattachments<enter><enter-command> set pipe_decode=\$my_pipe_decode<enter>" "view attachments in browser"
 
 macro compose  \ez     "<enter-command> set my_editor=\$editor<enter><enter-command> set editor='mogrify -sample 1000x1000'<enter><edit-file><enter-command> set editor=\$my_editor<enter>" "Resize attached image to within 1000x1000"
+macro compose  \eZ     "<enter-command> set my_editor=\$editor<enter><enter-command> set editor='mogrify -sample 2500x2500'<enter><edit-file><enter-command> set editor=\$my_editor<enter>" "Resize attached image to within 1000x1000"
 
 bind index,pager       <left>          sidebar-prev
 bind index,pager       \e<up>          sidebar-prev
index 497a253c5f5d638000bc33ba65c3547dc28be00b..d0bb5d5135c405e186f8e7c48a1337a4981f4e40 100755 (executable)
@@ -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
index 2c13a19063c64ef9edc24560a3d88e6267caa3b4..8f6f059983fc67afec9bdc752c75cee8dccd3b2f 100644 (file)
@@ -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'";
index 327dff28ee7d6e1f0de32a772b5584d4330c9201..3762d5f8bbeb3064e9bd912ce7141a6645fc2154 100755 (executable)
@@ -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 = \
-        '<div class="signature"><span class="leader">-- </span>{sig}</div>'
+"""
+<div class="signature"><span class="leader">-- </span><br/>
+{sig}</div>
+"""
 
 
 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('<title>Body</title>\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('</body>')
         html = f'{html[:eob]}{sig}\n{html[eob:]}'