summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--waybar/config12
-rw-r--r--waybar/style.css15
2 files changed, 22 insertions, 5 deletions
diff --git a/waybar/config b/waybar/config
index 3215a86..719ada4 100644
--- a/waybar/config
+++ b/waybar/config
@@ -160,8 +160,8 @@
"format": "{}% "
},
"battery": {
- //"bat": "BAT0",
- //"interval": 60,
+ "bat": "BAT0",
+ "interval": 60,
"state": {
"warning": 30,
"critical": 15
@@ -215,9 +215,11 @@
//"on-click-right": "killall rofi"
},
"custom/battery":{
- "interval": 60,
- "format": "{}%",
- "exec": "cat /sys/class/power_supply/BAT0/capacity",
+ "interval": 15,
+ "format": "{percentage}%",
+ "return-type": "json",
+ "exec": "custom-battery",
+ "tooltip": true,
},
"custom/power":{
"format": "",
diff --git a/waybar/style.css b/waybar/style.css
index 865e806..ff6dc9a 100644
--- a/waybar/style.css
+++ b/waybar/style.css
@@ -223,6 +223,21 @@ label:focus {
font-size: 18px;
}
+#custom-battery.battery_low{
+ background-color: yellow;
+ color: #1b1d1c;
+}
+
+#custom-battery.battery_crit{
+ background-color: red;
+ color: #1b1d1c;
+}
+
+#custom-battery.battery_charging{
+ background-color: #1d1b1c;
+ color: #198844;
+}
+
#custom-launcher{
background-color: #1b1d1c;
font-size: 20px;