Switch network checks to use github rather than google

This commit is contained in:
natemaia 2018-06-02 12:23:25 -07:00
parent 3972b35c31
commit 63814f6a29
2 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@ wireless_connected=""
ethernet_connected="" ethernet_connected=""
while true; do while true; do
if ping -c1 www.google.com &>/dev/null; then if ping -c1 www.github.com &>/dev/null; then
if (( count < 1 )); then if (( count < 1 )); then
ID="$(ip link | awk '/state UP/ {print $2}')" ID="$(ip link | awk '/state UP/ {print $2}')"
((count++)) ((count++))

View File

@ -8,26 +8,26 @@ total() { UPD=$(checkupdates | wc -l) ;}
while true; do while true; do
total total
if hash notify-send &>/dev/null; then if hash notify-send &>/dev/null; then
if (( $UPD > 50 )); then if (( UPD > 50 )); then
notify-send -u critical -i $ICON "You really need to update!!" "$UPD New packages" notify-send -u critical -i $ICON "You really need to update!!" "$UPD New packages"
elif (( $UPD > 25 )); then elif (( UPD > 25 )); then
notify-send -u normal -i $ICON "You should update soon" "$UPD New packages" notify-send -u normal -i $ICON "You should update soon" "$UPD New packages"
elif (( $UPD > 2 )); then elif (( UPD > 2 )); then
notify-send -u low -i $ICON "$UPD New packages" notify-send -u low -i $ICON "$UPD New packages"
fi fi
fi fi
while (( $UPD > 0 )); do while (( UPD > 0 )); do
if (( $UPD == 1 )); then if (( UPD == 1 )); then
echo "$UPD Update" echo "$UPD Update"
elif (( $UPD > 1 )); then elif (( UPD > 1 )); then
echo "$UPD Updates" echo "$UPD Updates"
fi fi
sleep 10 sleep 10
total total
done done
while (( $UPD == 0 )); do while (( UPD == 0 )); do
echo $BAR_ICON echo $BAR_ICON
sleep 1800 sleep 1800
total total