]> 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:

list mailboxes with cron, not offlineimap
authormartin f. krafft <madduck@madduck.net>
Thu, 8 Mar 2018 08:19:33 +0000 (12:19 +0400)
committermartin f. krafft <madduck@madduck.net>
Thu, 8 Mar 2018 08:19:47 +0000 (12:19 +0400)
.crontab.d/mutt
.gitignore.d/mutt
.mutt/list-mailboxes [new file with mode: 0755]
.mutt/muttrc

index 6b170bfab40af064c257e8905a44ddea37506538..c144ab56ffdf26fcda9174339acff8a03cb887ed 100644 (file)
@@ -1 +1,2 @@
 29 4 * * * [[ -d $VARDIR/mutt/header_cache ]] && echo '- *' >| $VARDIR/mutt/header_cache/.backup-filter && autoload -U zargs && zargs --no-run-if-empty -- $VARDIR/mutt/header_cache/*~*/.gitignore(.NDa+28) -- rm --
 29 4 * * * [[ -d $VARDIR/mutt/header_cache ]] && echo '- *' >| $VARDIR/mutt/header_cache/.backup-filter && autoload -U zargs && zargs --no-run-if-empty -- $VARDIR/mutt/header_cache/*~*/.gitignore(.NDa+28) -- rm --
+6 * * * * ~/.mutt/list-mailboxes ~/mail =inbox >| $VARDIR/mutt/mailboxes
index 6015555c9291d4e22a754875ae13c40a4211febd..4d243a43d4b851093f79c01e38b695f92465f0a3 100644 (file)
@@ -15,6 +15,7 @@
 !/.mutt/headers
 !/.mutt/hooks
 !/.mutt/keybindings
 !/.mutt/headers
 !/.mutt/hooks
 !/.mutt/keybindings
+!/.mutt/list-mailboxes
 !/.mutt/lists
 !/.mutt/mailcap-edit-wrapper
 !/.mutt/muttrc
 !/.mutt/lists
 !/.mutt/mailcap-edit-wrapper
 !/.mutt/muttrc
diff --git a/.mutt/list-mailboxes b/.mutt/list-mailboxes
new file mode 100755 (executable)
index 0000000..5e2460c
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+find "$1" -type d -name cur -printf '%h\n' | \
+  sed -e "s,^$1/,=,g" -e "s,^$1\$,$2," | \
+  egrep -v '^=(spool|discard|retrain(/(sp|h)am)?)$' | \
+  sort | xargs echo mailboxes
index 2b54bdf140482c92e74bc8026e723bbb9f7db586..9315ab13b55e7e4a96d52302232c2cbbb166381e 100644 (file)
@@ -4547,9 +4547,9 @@ source $my_confdir/lists
 source $my_confdir/spam
 source $my_confdir/hooks
 
 source $my_confdir/spam
 source $my_confdir/hooks
 
-set my_offlineimap_mailboxes = "$VARDIR/offlineimap/mailboxes"
 set my_mutt_mailboxes = "$VARDIR/mutt/mailboxes"
 set my_mutt_mailboxes = "$VARDIR/mutt/mailboxes"
-source "cat $my_offlineimap_mailboxes $my_mutt_mailboxes 2>/dev/null|"
+source "test -f $my_mutt_mailboxes && cat $my_mutt_mailboxes|
+#source "$my_confdir/list-mailboxes $folder $spoolfile|"
 
 set alias_file="$my_confdir/aliases"
 source "test -f $alias_file && cat $alias_file 2>/dev/null || echo unset alias_file|"
 
 set alias_file="$my_confdir/aliases"
 source "test -f $alias_file && cat $alias_file 2>/dev/null || echo unset alias_file|"