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