aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/system/start-scripts/newsboat-fetch.sh
blob: 06b08d9e73e48fc5ca2c5f1f9127cd4b59acdc55 (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 "$unreads" | sed 's/ .*//g')

    if (( $unreadnum > 0 )); then
        notify-send "newsboat feed" "$unreads"
    fi
    notify-send "Vitamins!" "take them"
    sleep 2h
    newsboat_loop
}
newsboat_loop