updates + waybar update notification

This commit is contained in:
mjallen18
2024-08-21 11:08:16 -05:00
parent 0c882f5fc3
commit 61180f64eb
2 changed files with 52 additions and 49 deletions

View File

@@ -72,7 +72,10 @@ def read_cache():
def main():
now = int(datetime.now().strftime("%H"))
mtime = int(time.localtime(os.stat(json_cache).st_ctime).tm_hour)
if os.path.exists(json_cache):
mtime = int(time.localtime(os.stat(json_cache).st_ctime).tm_hour)
else:
mtime = now + 1
if (now % 2 == 0 and mtime < now) or not os.path.exists(json_cache):
check()