waybar systemupdates icon yellow/red
This commit is contained in:
parent
21785526a8
commit
692a072fad
@ -17,8 +17,10 @@ fi
|
|||||||
|
|
||||||
updates=$(("$updates_arch" + "$updates_aur"))
|
updates=$(("$updates_arch" + "$updates_aur"))
|
||||||
|
|
||||||
if [[ $updates = 0 ]]; then
|
if [[ $updates -gt 50 ]]; then
|
||||||
printf '{"text": "%s", "alt": "updated", "tooltip": "%s Updates", "class": "green", "percentage": "100"}' "$updates" "$updates"
|
printf '{"text": "%s", "alt": "require-updates", "tooltip": "%s Updates", "class": "red"}' "$updates" "$updates"
|
||||||
|
elif [[ $updates -gt 0 ]]; then
|
||||||
|
printf '{"text": "$s", "alt": "has-updates", "tooltip": "%s Updates", "class": "yellow"}' "$updates" "$updates"
|
||||||
else
|
else
|
||||||
printf '{"text": "$s", "alt": "has-updates", "tooltip": "%s Updates", "class": "green", "percentage": "0"}' "$updates" "$updates"
|
printf '{"text": "%s", "alt": "updated", "tooltip": "%s Updates", "class": "green"}' "$updates" "$updates"
|
||||||
fi
|
fi
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
"custom/updates": {
|
"custom/updates": {
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
|
"require-updates": "",
|
||||||
"has-updates": "",
|
"has-updates": "",
|
||||||
"updated": ""},
|
"updated": ""},
|
||||||
"tooltip-format": "{}",
|
"tooltip-format": "{}",
|
||||||
|
@ -102,6 +102,14 @@ window#waybar.empty #window {
|
|||||||
color: @iconcolor;
|
color: @iconcolor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-updates.yellow {
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-updates.red {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
background-color: #2980b9;
|
background-color: #2980b9;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user