From 23d7ea728d985ddfe265a7b4ffd4baf564a10fe9 Mon Sep 17 00:00:00 2001
From: yourfriendoss <81387799+yourfriendoss@users.noreply.github.com>
Date: Wed, 29 Nov 2023 10:49:18 +0200
Subject: [PATCH] Add Battery
---
src/.config/waybar/config | 15 +++++++++++++--
src/.config/waybar/style.css | 5 ++++-
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/.config/waybar/config b/src/.config/waybar/config
index c795fe3..bf1a71a 100644
--- a/src/.config/waybar/config
+++ b/src/.config/waybar/config
@@ -5,12 +5,13 @@
"spacing": 4,
"modules-left": [
"hyprland/workspaces",
- "wlr/taskbar"
+ "wlr/taskbar",
],
"modules-center": [
"hyprland/window"
],
"modules-right": [
+ "battery",
"tray",
"clock"
],
@@ -33,7 +34,17 @@
"format": "{:%H:%M}",
"tooltip-format": "{:%Y %B}\n{calendar}"
},
+"battery": {
+ "interval": 60,
+ "states": {
+ "warning": 30,
+ "critical": 15
+ },
+ "format": "{capacity}% {icon}",
+ "format-icons": ["", "", "", "", ""],
+ "max-length": 25
+},
"tray": {
"spacing": 4
}
- }
\ No newline at end of file
+ }
diff --git a/src/.config/waybar/style.css b/src/.config/waybar/style.css
index d7a8d93..a789448 100644
--- a/src/.config/waybar/style.css
+++ b/src/.config/waybar/style.css
@@ -28,7 +28,10 @@ window#waybar {
#taskbar button.active {
background-image: linear-gradient(0deg, @selection, @background-darker);
}
+#battery {
+ padding: 0 10px;
+}
#clock {
padding: 0 4px;
background: @background;
-}
\ No newline at end of file
+}