summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/fetch_mail34
-rwxr-xr-x.local/bin/ndate2
2 files changed, 19 insertions, 17 deletions
diff --git a/.local/bin/fetch_mail b/.local/bin/fetch_mail
index 2002ce3..0c743ec 100755
--- a/.local/bin/fetch_mail
+++ b/.local/bin/fetch_mail
@@ -26,7 +26,10 @@ sub get_new_mail
my $ret;
system('killall mbsync >/dev/null 2>&1');
- system('mbsync', $acc);
+ $ret = system('mbsync', 'qwe');
+ if ($ret != 0) {
+ notify(" $acc: failed to sync mails");
+ }
return;
}
@@ -56,6 +59,20 @@ sub count_new_mails
sub fetch_thread
{
+ return;
+}
+
+sub fetch_mail
+{
+ $ENV{'MAIL'} = $HOME . '/.local/share/mail';
+ $ENV{'GNUPGHOME'} = $HOME . '/.local/share/gnupg';
+ $ENV{'PASSWORD_STORE_DIR'} = $HOME . '/.local/share/pass';
+ my $maildir = $ENV{'MAIL'} . '/';
+ # my $notify_str = " new mails\n";
+
+ # test gpg
+ my @accs = get_all_accounts();
+ foreach (@accs) {
my $pre_count = -1;
my $mc_file = MC_FILE_PATH . $_;
my $fh;
@@ -79,21 +96,6 @@ sub fetch_thread
seek($fh, 0, 0);
print $fh "$post_count";
close($fh);
- return;
-}
-
-sub fetch_mail
-{
- $ENV{'MAIL'} = $HOME . '/.local/share/mail';
- $ENV{'GNUPGHOME'} = $HOME . '/.local/share/gnupg';
- $ENV{'PASSWORD_STORE_DIR'} = $HOME . '/.local/share/pass';
- my $maildir = $ENV{'MAIL'} . '/';
- # my $notify_str = " new mails\n";
- my $og_length = length($notify_str);
-
- # test gpg
- my @accs = get_all_accounts();
- foreach (@accs) {
}
# notify($notify_str) if (length($notify_str) > $og_length);
return;
diff --git a/.local/bin/ndate b/.local/bin/ndate
index 372d0cd..460cf1d 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')"