X-Git-Url: https://software.frrobert.com/stationnotifier/blobdiff_plain/af3994cd4ca25241e117de29c3026b56fad9ff30..HEAD:/notificatorossl diff --git a/notificatorossl b/notificatorossl index 74bfe81..ce4aef4 100755 --- a/notificatorossl +++ b/notificatorossl @@ -2,9 +2,10 @@ # notifitcatorossl is a fork of https://github.com/ThatsRedacted/StationNotifier # This program uses openssl rather than curl to connect to a gemini site` -key='' -cert='' +key='/home/frrobert/.config/amfora/7debbb3fae40dbe77746aa465300febaec5abb778faa8a550f8e5924f0977983.key' +cert='/home/frrobert/.config/amfora/7debbb3fae40dbe77746aa465300febaec5abb778faa8a550f8e5924f0977983.crt' connectto=30 +howoften= tmpfile=$(mktemp /tmp/not.XXXXXX) url="gemini://station.martinrue.com/frrobert" @@ -34,17 +35,27 @@ do notifications=${my_array[2]} echo "" > $tmpfile if [[ $notifications -gt $lasttime ]]; then + new=$(expr $notifications - $lasttime) echo -en "\007" - echo "You have new notifications!" - read -p "Press enter to continue or amfora to go to notifications" answer + echo "You have $notifications notifications and $new new notifications!" + read -p "Press enter to continue, or either type amfora or lagrange to go to notifications" answer case $answer in - amfora) $(amfora $url) + amfora) + amfora $url + clear + ;; + lagrange) + lagrange $url + clear + ;; + *) + clear ;; esac - +echo "waiting for new notifications" lasttime=$notifications unset my_array fi - sleep 60 + sleep 600 done