File tree 3 files changed +40
-12
lines changed
3 files changed +40
-12
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
rm ~ /.mblaze/seq*
3
- cd ~ /Maildir/cur/
4
- nr=$( ls | tail -n 250 | msort -r | mseq -S | mscan -f " %-3n %c%u%r %10d <span fgcolor=\" darkcyan\" >%17f</span> ICON %2i%s" | ~ /dotfiles/mblaze2pango.sh | rofi -matching glob -tokenize -i -no-sort -no-levenshtein-sort -p " Mail" -markup -markup-rows -dmenu | cut -d " " -f 1)
3
+ # cd ~/Maildir/cur/
4
+ lists=$( ls -d ~ /Maildir/.Lists* | tr ' \n' ' ' )
5
+ DATETHRESHOLD=$( date --date=" 3 months ago" +%s)
6
+ for maildir in ~ /Maildir $lists ; do
7
+ case $maildir in
8
+ * CorporaList* |Siks* )
9
+ # noisy lists I don't really care about
10
+ ;;
11
+ * )
12
+ [ $( stat --format=" %X" $maildir /new) -gt $DATETHRESHOLD ] && \
13
+ ls $maildir /new | tail -n 250 | grep " ,S=" | sed " s|^|$maildir /new |" >> ~ /.mblaze/seq_pre
14
+ [ $( stat --format=" %X" $maildir /cur) -gt $DATETHRESHOLD ] && \
15
+ ls $maildir /cur | tail -n 250 | grep " ,S=" | sed " s|^|$maildir /cur |" >> ~ /.mblaze/seq_pre
16
+ ;;
17
+ esac
18
+ done
19
+ cat ~ /.mblaze/seq_pre | sort -rk 2 | head -n 1000 | sed " s| |/|" > ~ /.mblaze/seq
20
+ nr=$( mseq | mscan -f " %-3n %c%u%r %10d <span fgcolor=\" darkcyan\" >%17f</span> ICON %2i%s" | ~ /dotfiles/mblaze2pango.sh | rofi -matching glob -tokenize -i -no-sort -no-levenshtein-sort -p " Mail" -markup -markup-rows -dmenu -click-to-exit | cut -d " " -f 1)
21
+ # nr=$(find ~/Maildir/cur/ -ctime -14 | tail -n 250 | msort -r | mseq -S | mscan -f "%-3n %c%u%r %10d <span fgcolor=\"darkcyan\">%17f</span> ICON %2i%s" | ~/dotfiles/mblaze2pango.sh | rofi -matching glob -tokenize -i -no-sort -no-levenshtein-sort -p "Mail" -markup -markup-rows -dmenu | cut -d " " -f 1)
5
22
if [ -n " $nr " ]; then
6
23
ATTACHDIR=~ /Downloads/mailattachments
7
24
rm -rf " $ATTACHDIR "
Original file line number Diff line number Diff line change 2
2
while read -r line; do
3
3
nr=$( echo " $line " | cut -d " " -f 1)
4
4
remainder=$( echo " $line " | cut -d " " -f 2-)
5
- color=white
5
+ color=" #fbf1c7 "
6
6
icon=" "
7
7
case " $line " in
8
- * " Registration request from" * )
8
+ * " Registration request from" * | * " build success " * | * " build fail " * | * Siksleden * | * Corpora-List * | * Nieuwsbrief * | * Newsletter * | * Correspondent * | * Steam * )
9
9
color=gray
10
10
;;
11
11
* " [PATCH" * )
12
12
color=HotPink
13
13
;;
14
+ * " TO:" * )
15
+ color=green
16
+ ;;
17
+ esac
18
+ case " $line " in
19
+ * " TO:" * )
20
+ icon=👉
21
+ ;;
14
22
* " frog" * )
15
23
icon=🐸
16
24
;;
17
25
* " folia" * )
18
26
icon=🥬
19
27
;;
20
- * " TO:" * )
21
- icon=👉
22
- color=green
28
+ * " clam" * )
29
+ icon=🐚
30
+ ;;
31
+ * " sxmo" * )
32
+ icon=📱
23
33
;;
24
34
* )
25
35
from=$( maddr -h from " $nr " )
@@ -40,13 +50,16 @@ while read -r line; do
40
50
* anaxotic* |* van-gompel* )
41
51
icon=👪
42
52
;;
53
+ * debian.org* |* alpinelinux.org* )
54
+ icon=🐧
55
+ ;;
43
56
* github.com* )
44
57
color=HotPink
45
- icon=
58
+ icon=🎫
46
59
;;
47
60
* sr.ht* )
48
61
color=HotPink
49
- icon=
62
+ icon=🎫
50
63
;;
51
64
* noreply* |* homeautomation* )
52
65
color=gray
@@ -55,6 +68,4 @@ while read -r line; do
55
68
;;
56
69
esac
57
70
echo " $nr <span fgcolor=\" $color \" >$remainder </span>" | sed " s/ ICON / $icon /" | sed ' s/Re:/<span fgcolor="green">Re:<\/span>/i' | sed ' s/Fwd:/<span fgcolor="blue">Fwd:<\/span>/i'
58
-
59
-
60
71
done
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ tag-transforms "inbox" "📥" \
246
246
"folia" "🥬" \
247
247
"flat" "🥬" \
248
248
"ci" "🤖" \
249
- "sysadmin" "💻 " \
249
+ "sysadmin" "🎠 " \
250
250
"homeautomation" "🏡" \
251
251
"lamachine" "🦙" \
252
252
"university" "🎓" \
You can’t perform that action at this time.
0 commit comments