1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_sway.git synced 2024-08-16 13:49:49 +02:00

Color support for ping widget

This commit is contained in:
L3D 2024-07-31 16:26:26 +02:00
parent 926c74b6e2
commit 9cda8c2719
Signed by: l3d
GPG key ID: CD08445BFF4313D1
2 changed files with 10 additions and 6 deletions

View file

@ -28,13 +28,13 @@ def main():
status = {
"text": "Online",
"tooltip": "Internet connection is active",
"class": "online"
"class": "pingonline"
}
else:
status = {
"text": "Offline",
"tooltip": "No internet connection",
"class": "offline"
"class": "pingoffline"
}
print(json.dumps(status))
sys.stdout.flush()

View file

@ -281,10 +281,14 @@ label:focus {
background-color: transparent;
}
#custom-ping.connected {
color: #00FF00; /* Grün für verbunden */
.pingonline {
color: white;
background-color: #2980b9;
padding: 0px 8px;
}
#custom-ping.disconnected {
color: #FF0000; /* Rot für nicht verbunden */
.pingoffline {
color: white;
background-color: #f53c3c;
padding: 0px 8px;
}