feat: add battery icon to waybar and add wifi status

This commit is contained in:
oddlama 2024-07-12 23:47:18 +02:00
parent 78904fed18
commit 79e1e782c4
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 23 additions and 9 deletions

View file

@ -91,29 +91,32 @@ button:hover {
color: #000000; color: #000000;
} }
#battery { #battery.charging {
background-color: #ffffff; background-color: #ffffff;
color: #000000; color: #000000;
} }
#battery.charging, #battery.plugged:not(.charging) {
#battery.plugged { background-color: #2980b9;
background-color: #26A65B;
} }
@keyframes blink { @keyframes blink {
to { to {
background-color: #ffffff; background-color: #000000;
color: #000000;
} }
} }
/* Using steps() instead of linear as a timing function to limit cpu usage */ /* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.warning:not(.charging) {
background-color: #f1c40f;
color: #000000;
}
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
background-color: #e05f65; background-color: #e05f65;
animation-name: blink; animation-name: blink;
animation-duration: 0.5s; animation-duration: 0.5s;
animation-timing-function: steps(12); animation-timing-function: step-start;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }

View file

@ -42,7 +42,7 @@
#"temperature" #"temperature"
"cpu" "cpu"
"memory" "memory"
#"battery" "battery"
"custom/notification" "custom/notification"
"clock" "clock"
@ -119,6 +119,16 @@
# escape = true; # escape = true;
#}; #};
battery = {
interval = 2;
format = "{icon} {capacity}%";
format-icons = ["" "" "" "" "" "" "" "" ""];
states = {
warning = 25;
critical = 15;
};
};
privacy = { privacy = {
icon-spacing = 4; icon-spacing = 4;
icon-size = 18; icon-size = 18;
@ -200,6 +210,7 @@
network = { network = {
interval = 5; interval = 5;
format-ethernet = "󰈀 {ipaddr}/{cidr} <span color='#ffead3'> {bandwidthDownBytes}</span> <span color='#ecc6d9'> {bandwidthUpBytes}</span>"; format-ethernet = "󰈀 {ipaddr}/{cidr} <span color='#ffead3'> {bandwidthDownBytes}</span> <span color='#ecc6d9'> {bandwidthUpBytes}</span>";
format-wifi = " {signalStrength}% {essid} {ipaddr}/{cidr} <span color='#ffead3'> {bandwidthDownBytes}</span> <span color='#ecc6d9'> {bandwidthUpBytes}</span>";
format-disconnected = " Disconnected"; format-disconnected = " Disconnected";
tooltip-format = " {bandwidthUpBytes}\n {bandwidthDownBytes}"; tooltip-format = " {bandwidthUpBytes}\n {bandwidthDownBytes}";
}; };