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:
parent
926c74b6e2
commit
9cda8c2719
2 changed files with 10 additions and 6 deletions
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue