all repos — dotfiles @ 02380af82f056bfd9f5b6935b95a7373278b8296

linux dotfiles

added cron routines
prithugoswami prithugoswami524@gmail.com
Tue, 25 Dec 2018 11:43:28 +0530
commit

02380af82f056bfd9f5b6935b95a7373278b8296

parent

f5fda248f4c7155dbb7e722fdf1427d2ae0f5189

2 files changed, 20 insertions(+), 0 deletions(-)

jump to
A bin/cron/newsboat-cron

@@ -0,0 +1,17 @@

+#!/bin/sh + +ping -q -c 1 8.8.8.8 >/dev/null || exit +count=0 +echo -e '\uf2f1' > $HOME/.newsboat/unread && pkill -SIGRTMIN+10 i3blocks +count=$(newsboat -x "reload" && newsboat -x "print-unread" | cut -d ' ' -f1) + +if [ $count -gt 0 ] +then + echo $count > $HOME/.newsboat/unread + pkill -SIGRTMIN+10 i3blocks + notify-send "$count unread RSS feeds" +elif [ $count -eq 0 ] +then + echo $count > $HOME/.newsboat/unread + pkill -SIGRTMIN+10 i3blocks +fi
A bin/cron/playlist-sync-cron

@@ -0,0 +1,3 @@

+#!/bin/bash +PATH=/home/prithu/bin:/home/prithu/.gem/ruby/2.5.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl +playlist-sync 2>&1 | tee "$HOME/.log/playlist-sync/$(date +%s | md5sum | awk '{print $1}')"