add battery widget

This commit is contained in:
Adam 2023-06-17 18:48:15 -04:00
parent 63d786955f
commit 5212d6c0ab
2 changed files with 9 additions and 13 deletions

View file

@ -8,7 +8,7 @@
"modules-left": ["river/tags"], "modules-left": ["river/tags"],
"modules-center": ["river/window"], "modules-center": ["river/window"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "tray", "clock"], "modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "battery", "tray", "clock"],
// modules config // modules config
@ -70,10 +70,10 @@
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
"format": "{capacity}% {icon}", "format": "{icon} {capacity}%",
"format-charging": "{capacity}%", "format-charging": "{capacity}%",
"format-plugged": "{capacity}%", "format-plugged": "{capacity}%",
"format-alt": "{time} {icon}", "format-alt": "{icon} {time}",
// "format-good": "", // An empty format will hide the module // "format-good": "", // An empty format will hide the module
// "format-full": "", // "format-full": "",
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]

View file

@ -50,7 +50,8 @@ button:hover {
#memory, #memory,
#network, #network,
#tray, #tray,
#pulseaudio { #pulseaudio,
#battery {
background-color: @color1; background-color: @color1;
padding: 0 10px; padding: 0 10px;
} }
@ -78,14 +79,9 @@ button:hover {
background-color: #eb4d4b; background-color: #eb4d4b;
} }
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged { #battery.charging, #battery.plugged {
color: #ffffff; color: @foreground;
background-color: #26A65B; background-color: @color1;
} }
@keyframes blink { @keyframes blink {