aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-03-24 10:36:10 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-03-24 10:36:10 +0100
commiteede6f75d0b7c643fba07d840f8d97e00104a12c (patch)
treee9f08a514150885e7df122e568a39729770d2848 /scripts
parent7f7f59ce5e0cc9a2de8b0ce55acf73c41e171103 (diff)
downloaddotfiles-eede6f75d0b7c643fba07d840f8d97e00104a12c.tar.gz
waybar wifionice
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/icewifi.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/icewifi.py b/scripts/icewifi.py
new file mode 100755
index 0000000..9286c0c
--- /dev/null
+++ b/scripts/icewifi.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import requests
+import json
+
+data = requests.get("https://iceportal.de/api1/rs/status")
+
+if data.status_code != 200:
+ print(f"HTTP Status {data.status_code}")
+
+t_info = data.json()
+
+return_info={
+ 'text':t_info["tzn"],
+ 'tooltip':f'BR{t_info["series"]}, I-Netz {t_info["internet"]}',
+ #'class':'',
+ 'percentage':t_info["speed"]
+}
+
+print(json.dumps(return_info))