From ec330589a41b423950fe49449248edb546961383 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 30 Jul 2025 02:44:19 -0500 Subject: Add json syntax highlighting to waybar config --- waybar/config | 1 + 1 file changed, 1 insertion(+) (limited to 'waybar/config') diff --git a/waybar/config b/waybar/config index 25fb4dc..5807b92 100644 --- a/waybar/config +++ b/waybar/config @@ -1,3 +1,4 @@ +// vim: set filetype=json5 : { "layer": "bottom", "position": "top", -- cgit v1.2.3 From 66a55d31d6cfa115c99a7fe3c93fbbed7901fe8e Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 30 Jul 2025 04:23:51 -0500 Subject: Add custom/battery for while battery is broken --- waybar/config | 9 +++++++-- waybar/style.css | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'waybar/config') diff --git a/waybar/config b/waybar/config index 5807b92..9246fa2 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 @@ -214,6 +214,11 @@ "on-click": "rofi -show drun", //"on-click-right": "killall rofi" }, + "custom/battery":{ + "interval": 60, + "format": "{}%", + "exec": "cat /sys/class/power_supply/BAT0/capacity", + }, "custom/power":{ "format": "", "on-click": "rofi -show p -modi p:rofi-power-menu", diff --git a/waybar/style.css b/waybar/style.css index 0a4431c..865e806 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -89,6 +89,7 @@ window#waybar.hidden { #custom-media, #custom-launcher, #custom-power, +#custom-battery, #custom-layout, #custom-updater, #custom-snip, @@ -215,7 +216,11 @@ label:focus { background-color: #1b1d1c; font-size: 18px; margin-right: 5px; +} +#custom-battery{ + background-color: #1b1d1c; + font-size: 18px; } #custom-launcher{ -- cgit v1.2.3 From d1412fdffa7388d04c01a26ab89cef8151efde6e Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 30 Jul 2025 05:06:22 -0500 Subject: Restore battery waybar settings in case it starts working again --- waybar/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'waybar/config') diff --git a/waybar/config b/waybar/config index 9246fa2..7775078 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 -- cgit v1.2.3 From 218e54aa900ba4e469a405f3e81bf00e024b228d Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 30 Jul 2025 05:06:51 -0500 Subject: Expand custom/battery module --- waybar/config | 8 +++++--- waybar/style.css | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'waybar/config') diff --git a/waybar/config b/waybar/config index 7775078..933dedc 100644 --- a/waybar/config +++ b/waybar/config @@ -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; -- cgit v1.2.3