aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xi3blocks/i3mailbox.sh7
-rwxr-xr-xmail.sh3
-rwxr-xr-xsyncMail.sh5
3 files changed, 11 insertions, 4 deletions
diff --git a/i3blocks/i3mailbox.sh b/i3blocks/i3mailbox.sh
index b78528c..787885e 100755
--- a/i3blocks/i3mailbox.sh
+++ b/i3blocks/i3mailbox.sh
@@ -17,6 +17,7 @@ case $BLOCK_BUTTON in
esac
label=📫
+disrootInbox="$CONFIG_FOLDER_DISROOT_INBOX"
gmailInbox="$CONFIG_FOLDER_GMAIL_INBOX"
unioviInbox="$CONFIG_FOLDER_UNIOVI_INBOX"
output="$label"
@@ -26,6 +27,11 @@ syncIcon=""
output="$output$syncIcon"
shortOutput="$shortOutput$syncIcon"
+if [ -n "$disrootInbox" ]; then
+ disrootN="$(ls "$disrootInbox"/* 2>/dev/null | wc -l)"
+ output="$output Disroot: $disrootN "
+ shortOutput="$shortOutput D: $disrootN "
+fi
if [ -n "$gmailInbox" ]; then
gmailN="$(ls "$gmailInbox"/* 2>/dev/null | wc -l)"
output="$output Gmail: $gmailN "
@@ -37,6 +43,5 @@ if [ -n "$unioviInbox" ]; then
shortOutput="$shortOutput U: $unioviN "
fi
-#echo "$(cat /tmp/imapsyncicon) Gmail: $gmailN uniovi: $unioviN"
echo "${output% }"
echo "${shortOutput% }"
diff --git a/mail.sh b/mail.sh
index 7798354..5478787 100755
--- a/mail.sh
+++ b/mail.sh
@@ -3,7 +3,8 @@
# Opens a mailbox using neomutt (and isync if neomutt configured to do so)
pkill -SIGRTMIN+15 i3blocks
-account="$(printf "gmail\nuniovi" | fzf)"
+account="$(printf "gmail\nuniovi\ndisroot" | fzf)"
[ "$account" = "gmail" ] && neomutt -F "$HOME/.config/mutt/gmmuttrc"
[ "$account" = "uniovi" ] && neomutt -F "$HOME/.config/mutt/cumuttrc"
+[ "$account" = "disroot" ] && neomutt -F "$HOME/.config/mutt/drmuttrc"
pkill -SIGRTMIN+15 i3blocks
diff --git a/syncMail.sh b/syncMail.sh
index dfc4ee6..fd47994 100755
--- a/syncMail.sh
+++ b/syncMail.sh
@@ -2,7 +2,8 @@
# Calls mbsync (isync binary) to syncronize mailboxes
-pkill -SIGRTMIN+15 i3blocks
+[ -n "$STATUS_BAR" ] && pkill -SIGRTMIN+15 "$STATUS_BAR"
mbsync -c ~/.config/isync/gmmbsyncrc -a
mbsync -c ~/.config/isync/uombsyncrc -a
-pkill -SIGRTMIN+15 i3blocks
+mbsync -c ~/.config/isync/drmbsyncrc -a
+[ -n "$STATUS_BAR" ] && pkill -SIGRTMIN+15 "$STATUS_BAR"