From 9aa542a32f3c8a02558497cb5242d41bac5a23e1 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Tue, 19 Mar 2024 15:09:21 -0600 Subject: [PATCH] Re-added delay to eww network script for tycho --- .config/eww/scripts/network.py##hostname.tycho | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/eww/scripts/network.py##hostname.tycho b/.config/eww/scripts/network.py##hostname.tycho index dca8109..cbca19c 100755 --- a/.config/eww/scripts/network.py##hostname.tycho +++ b/.config/eww/scripts/network.py##hostname.tycho @@ -225,13 +225,13 @@ while True: hop = get_first_hop() gw = get_gateways() default_route = get_default_route() - # public IP shouldn't change often, so only check every 30 minutes or + # public IP shouldn't change often, so only check every 2 hours or # if the default route or first hop changes if ( default_route != last_default_route or last_ip_data is None or last_request is None - or now() - last_request > 1800 + or now() - last_request > (2 * 60 * 60) or (hop != last_first_hop and hop is not None) ): print("refreshing public IP", file=sys.stderr, flush=True) @@ -277,3 +277,5 @@ while True: ), flush=True, ) + + sleep(5)