aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/system/start-scripts/newsboat-fetch.sh
blob: 5eefe9b31bce9ca6f3008b6b2f2278b59d65815b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
newsboat_loop(){
    NO_PROXY=\".com,.org,.xyz,.chat,.social,.net,.co,.love\" newsboat -x reload
    #newsboat -x print-unread | xargs -0 notify-send "newsboat feed"

    unreads=$(newsboat -x print-unread)
    unreadnum=$(printf -- "%s" "$unreads" | sed 's/ .*//g')

    if [ "$unreadnum" -gt 0 ]; then
        notify-send "newsboat feed" "$unreads"
    fi
    notify-send "Vitamins!" "take them"
    sleep 2h
    newsboat_loop
}
newsboat_loop