dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 1413a3df4e6f0bc24b4e493b89754fb87174d04d
parent 4ad78cfad3e1c5e97fc4cd48fea0de21973143bb
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Tue,  3 Apr 2018 18:32:43 -0400

Add notification for gdh folder

Diffstat:
Mlinks/.mutt/muttrc | 1+
Mlinks/.w3m/bookmark.html | 3++-
Mlinks/bin/mailstatus.sh | 10+++++++---
Mmisc_code/bitbar-plugins/mail.5s.sh | 12++++++++++--
4 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/links/.mutt/muttrc b/links/.mutt/muttrc @@ -162,6 +162,7 @@ macro index \ u "<change-folder>=adamsgaard/Spam.unsure/<enter>" "Go to adamsgaa macro index \ a "<change-folder>=adamsgaard/academic-alerts/<enter>" "Go to adamsgaard/academic-alerts" macro index \ s "<change-folder>=adamsgaard/Spam/<enter>" "Go to adamsgaard/Spam" macro index \ ! "<change-folder>=adamsgaard/Sent/<enter>" "Go to adamsgaard/Sent" +macro index \ g "<change-folder>=adamsgaard/geodatahub/<enter>" "Go to adamsgaard/GeoDataHub" macro index \ 5 "<change-folder>=geomail/INBOX/<enter>" "Go to Geomail inbox" macro index \ % "<change-folder>=geomail/Sent/<enter>" "Go to Geomail sent" macro index \ 6 "<change-folder>=ucsd/INBOX/<enter>" "Go to UCSD inbox" diff --git a/links/.w3m/bookmark.html b/links/.w3m/bookmark.html @@ -42,8 +42,9 @@ <li><a href="https://www.youtube.com/feed/subscriptions">YouTube</a> <!--End of section (do not delete this comment)--> </ul> -<h2>Github</h2> +<h2>Development</h2> <ul> +<li><a href="https://gitlab.com/GeoDataHub/GeoDataHub">Gitlab/GeoDataHub/GeoDataHub</a> <li><a href="https://github.com/">Github</a> <li><a href="https://github.com/anders-dc">Github/anders-dc</a> <li><a href="https://github.com/anders-dc/dotfiles">Github/anders-dc/dotfiles</a> diff --git a/links/bin/mailstatus.sh b/links/bin/mailstatus.sh @@ -1,9 +1,9 @@ -#!/bin/bash +#!/bin/bash -e maildir=~/Mail if [ ! -d $maildir ]; then exit 0 fi -newmails=$(find $maildir/*/INBOX/new -type f) +newmails=$(find $maildir/*/{INBOX,geodatahub}/new -type f) numbernewmails=$(echo $newmails | wc -w | sed 's/ *//') mailboxes="$(echo $newmails | tr ' ' '\n' | sed 's/.*Mail\///' | sed 's/\/INBOX.*//')" @@ -14,7 +14,11 @@ offlineimap=/usr/local/bin/offlineimap accounts="" if [[ $mailboxes == *"adamsgaard"* ]]; then - accounts="${accounts}a" + if [[ $mailboxes == *"geodatahub"* ]]; then + accounts="${accounts}G" + else + accounts="${accounts}a" + fi fi if [[ $mailboxes == *"princeton"* ]]; then accounts="${accounts}p" diff --git a/misc_code/bitbar-plugins/mail.5s.sh b/misc_code/bitbar-plugins/mail.5s.sh @@ -1,5 +1,9 @@ #!/bin/bash -newmails=$(find ~/Mail/*/INBOX/new -type f) +maildir=~/Mail +if [ ! -d $maildir ]; then + exit 0 +fi +newmails=$(find $maildir/*/{INBOX,geodatahub}/new -type f) numbernewmails=$(echo $newmails | wc -w | sed 's/ *//') mailboxes="$(echo $newmails | tr ' ' '\n' | sed 's/.*Mail\///' | sed 's/\/INBOX.*//')" @@ -10,7 +14,11 @@ offlineimap=/usr/local/bin/offlineimap accounts="" if [[ $mailboxes == *"adamsgaard"* ]]; then - accounts="${accounts}a" + if [[ $mailboxes == *"geodatahub"* ]]; then + accounts="${accounts}G" + else + accounts="${accounts}a" + fi fi if [[ $mailboxes == *"princeton"* ]]; then accounts="${accounts}p"