mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-27 03:58:51 +02:00
polybar-weather: don't use nm-online -s flag
It only checks if network manager was online at some point in the past.
This commit is contained in:
parent
7f5e6e0578
commit
97f44f09b1
1 changed files with 2 additions and 2 deletions
|
@ -146,10 +146,10 @@ if __name__ == "__main__":
|
||||||
except requests.exceptions.ConnectionError:
|
except requests.exceptions.ConnectionError:
|
||||||
# Wait to be online
|
# Wait to be online
|
||||||
logger.info("not online, waiting")
|
logger.info("not online, waiting")
|
||||||
time.sleep(5)
|
|
||||||
update_status("", options.output)
|
update_status("", options.output)
|
||||||
|
time.sleep(2)
|
||||||
process = subprocess.run(
|
process = subprocess.run(
|
||||||
["nm-online", "-s", "-q", "-t", str(options.online_timeout * 60)]
|
["nm-online", "-q", "-t", str(options.online_timeout * 60)]
|
||||||
)
|
)
|
||||||
if process.returncode != 0:
|
if process.returncode != 0:
|
||||||
logger.warning("not online, exiting")
|
logger.warning("not online, exiting")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue