summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.local/bin/fetch_mail9
-rwxr-xr-x.local/bin/fetch_sfeed2
-rwxr-xr-x.local/bin/ndate2
3 files changed, 5 insertions, 8 deletions
diff --git a/.local/bin/fetch_mail b/.local/bin/fetch_mail
index eaee5fb..04df4b3 100755
--- a/.local/bin/fetch_mail
+++ b/.local/bin/fetch_mail
@@ -13,7 +13,7 @@ sub test_gpg
$ret = system("echo test | gpg2 --sign --batch --no-tty --pinentry-mode error -o /dev/null >/dev/null 2>&1");
if ($ret != 0) {
- notify(" gpg locked | can't fetch mails");
+ notify("[!] gpg locked | can't fetch mails");
}
return $ret;
}
@@ -37,7 +37,7 @@ sub get_new_mail
$ret = system('mbsync', $acc);
if ($ret != 0) {
- notify(" $acc: failed to sync mails");
+ notify("[!] $acc: failed to sync mails");
}
return;
}
@@ -80,13 +80,10 @@ sub fetch_thread
open($fh, '+>', $mc_file) or die $!;
$pre_count = -1;
}
- # if ($pre_count == -1) {
- # $pre_count = count_new_mails($_, $maildir);
- # }
get_new_mail($acc);
my $post_count = count_new_mails($acc);
if ($post_count > $pre_count && $post_count > 0) {
- my $notify_str = ' ' . $acc . ': ' . $post_count . ' new mail';
+ my $notify_str = '[mail] ' . $acc . ': ' . $post_count . ' new mail';
$notify_str .= ($post_count > 1 ? "s\n" : "\n");
notify($notify_str)
}
diff --git a/.local/bin/fetch_sfeed b/.local/bin/fetch_sfeed
index 08e6e41..3588ea2 100755
--- a/.local/bin/fetch_sfeed
+++ b/.local/bin/fetch_sfeed
@@ -14,5 +14,5 @@ post=$(wc -l $XDG_DATA_HOME/sfeed/feeds/* |
rev |
tr -d ' ')
if [ $post -gt $pre ]; then
- exec herbe " $((post-pre)) new articles" &
+ exec herbe "[rss] $((post-pre)) new articles" &
fi
diff --git a/.local/bin/ndate b/.local/bin/ndate
index 7a3f6ad..4ee1758 100755
--- a/.local/bin/ndate
+++ b/.local/bin/ndate
@@ -11,4 +11,4 @@
# == ================
# =====================
-exec herbe " $(date '+%H:%M | %a, %d %b %Y')" &
+exec herbe "$(date '+%H:%M | %a, %d %b %Y')" &