summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-09-27 16:46:37 +0200
committerJoe <bousset.rudy@gmail.com>2022-09-27 16:46:37 +0200
commit79c7da068057cff33d10a7df62ac673a81863486 (patch)
tree8f7d7a727181fed2a1d8fed9f6b6c8fa7758f2c2
parentup (diff)
downloaddotfiles-bsd-79c7da068057cff33d10a7df62ac673a81863486.tar.gz
dotfiles-bsd-79c7da068057cff33d10a7df62ac673a81863486.tar.bz2
dotfiles-bsd-79c7da068057cff33d10a7df62ac673a81863486.tar.xz
dotfiles-bsd-79c7da068057cff33d10a7df62ac673a81863486.tar.zst
dotfiles-bsd-79c7da068057cff33d10a7df62ac673a81863486.zip
up
-rw-r--r--.config/mutt/accounts/2-gmail_br.muttrc3
-rwxr-xr-x.local/bin/status/sb-mailbox19
2 files changed, 18 insertions, 4 deletions
diff --git a/.config/mutt/accounts/2-gmail_br.muttrc b/.config/mutt/accounts/2-gmail_br.muttrc
index 4c3b748..0a044b7 100644
--- a/.config/mutt/accounts/2-gmail_br.muttrc
+++ b/.config/mutt/accounts/2-gmail_br.muttrc
@@ -20,7 +20,8 @@ bind pager G bottom
macro index o "<shell-escape>killall mbsync >/dev/null 2>&1; mbsync -c $XDG_CONFIG_HOME/mbsync/mbsyncrc gmail_br<enter>" "run mbsync to sync bousset.rudy@gmail.com"
unmailboxes *
-mailboxes "=INBOX" "=[Gmail]/Sent Mail" "=[Gmail]/Drafts" "=[Gmail]/Spam" "=[Gmail]/Trash" "=Keep"
+mailboxes "=INBOX" "=[Gmail]/Sent Mail" "=[Gmail]/Drafts" "=[Gmail]/Spam" "=[Gmail]/Trash" "=Keep" \
+ "=[Gmail]/All Mail" "=[Gmail]/Chats" "=[Gmail]/Important" "=[Gmail]/Starred"
macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox"
macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox"
diff --git a/.local/bin/status/sb-mailbox b/.local/bin/status/sb-mailbox
index 3ce5f31..892607c 100755
--- a/.local/bin/status/sb-mailbox
+++ b/.local/bin/status/sb-mailbox
@@ -16,6 +16,7 @@ esac
mb_a="$(ls "${MAIL:-/var/mail/jozan}"/main/INBOX/new/ | wc -l 2>/dev/null)"
mb_b="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new/ | wc -l 2>/dev/null)"
mb_c="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new/ | wc -l 2>/dev/null)"
+mb_d="$(ls "${MAIL:-/var/mail/jozan}"/gmail_tos/INBOX/new/ | wc -l 2>/dev/null)"
sync=0
if pidof mbsync >/dev/null 2>&1; then
@@ -29,7 +30,7 @@ case "$sync" in
esac
if [ "$mb_a" -gt 0 ]; then
- echo -n "A:" $mb_a
+ echo -n "main:" $mb_a
fi
if [ "$mb_a" -gt 0 ] && [ "$mb_b" -gt 0 ]; then
@@ -37,7 +38,7 @@ if [ "$mb_a" -gt 0 ] && [ "$mb_b" -gt 0 ]; then
fi
if [ "$mb_b" -gt 0 ]; then
- echo -n "B:" $mb_b
+ echo -n "br:" $mb_b
fi
if [ "$mb_b" -gt 0 ] && [ "$mb_c" -gt 0 ]; then
@@ -47,5 +48,17 @@ elif [ "$mb_a" -gt 0 ] && [ "$mb_c" -gt 0 ]; then
fi
if [ "$mb_c" -gt 0 ]; then
- echo -n "C:" $mb_c
+ echo -n "oon:" $mb_c
+fi
+
+if [ "$mb_c" -gt 0 ] && [ "$mb_d" -gt 0 ]; then
+ echo -n " "
+elif [ "$mb_b" -gt 0 ] && [ "$mb_d" -gt 0 ]; then
+ echo -n " "
+elif [ "$mb_a" -gt 0 ] && [ "$mb_d" -gt 0 ]; then
+ echo -n " "
+fi
+
+if [ "$mb_d" -gt 0 ]; then
+ echo -n "tos:" $mb_d
fi