From 8234c3750c2356a0b0894f8fb89403011a9b232a Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Mon, 29 Jul 2024 21:45:02 -0400 Subject: [PATCH] =?UTF-8?q?feat(waybar):=20update=20battery=20module=20*?= =?UTF-8?q?=20Remove=20`format-charging`=20and=20`format-plugged`=20settin?= =?UTF-8?q?gs=20in=20favor=20of=20just=20using=20the=20graduated=20battery?= =?UTF-8?q?=20level=20icons.=20Also=20=EF=97=A7=20is=20a=20depreciated/rem?= =?UTF-8?q?oved=20Nerd=20Font=20icon.=20If=20we=20want=20to=20visually=20d?= =?UTF-8?q?ifferentiate=20the=20charging=20state,=20CSS=20rules=20in=20`~/?= =?UTF-8?q?.config/waybar/style.css`=20might=20be=20a=20better=20way=20to?= =?UTF-8?q?=20handle=20that.=20*=20Remove=20the=20commented=20lines=20beca?= =?UTF-8?q?use=20it=20is=20unlikely=20we=20will=20ever=20want=20these=20sp?= =?UTF-8?q?ecific=20settings.=20*=20Remove=20PBPbattery=20module=20and=20a?= =?UTF-8?q?ssociated=20script.=20It=20is=20all=20commented=20out=20anyway.?= =?UTF-8?q?=20This=20feature=20has=20been=20built-in=20to=20Waybar=20for?= =?UTF-8?q?=20some=20time=20now;=20a=20custom=20script=20is=20no=20longer?= =?UTF-8?q?=20needed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/waybar/config | 15 ++------------- .config/waybar/scripts/PBPbattery.sh | 21 --------------------- .config/waybar/style.css | 3 +-- 3 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 .config/waybar/scripts/PBPbattery.sh diff --git a/.config/waybar/config b/.config/waybar/config index c7bf5bc..68a8c43 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -23,7 +23,6 @@ "pulseaudio", "custom/keyboard-layout", "battery", - //"custom/PBPbattery", "backlight#icon", "backlight#value", "clock", @@ -41,26 +40,16 @@ "deactivated": "" } }, - + "battery": { "states": { - // "good": 95, "warning": 30, "critical": 15 }, - "format": "{capacity}% {icon}", - "format-charging": "{capacity}% ", - "format-plugged": "{capacity}% ", - // "format-good": "", // An empty format will hide the module - // "format-full": "", + "format": "{icon} {capacity}%", "format-icons": ["", "", "", "", ""] }, - "custom/PBPbattery": { - "exec": "~/.config/waybar/scripts/PBPbattery.sh", - "format": "{}", - }, - "clock": { "interval": 10, "format-alt": " {:%e %b %Y}", // Icon: calendar-alt diff --git a/.config/waybar/scripts/PBPbattery.sh b/.config/waybar/scripts/PBPbattery.sh deleted file mode 100644 index 1cf34da..0000000 --- a/.config/waybar/scripts/PBPbattery.sh +++ /dev/null @@ -1,21 +0,0 @@ - -#!/bin/bash -#simple Shellscript for waybar/i3blocks/polybar on Pinebook pro -#05012020 geri123@gmx.net Gerhard S. - -PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity) -STATUS=$(cat /sys/class/power_supply/cw2015-battery/status) -case $(( - $PERCENT >= 0 && $PERCENT <= 20 ? 1 : - $PERCENT > 20 && $PERCENT <= 40 ? 2 : - $PERCENT > 40 && $PERCENT <= 60 ? 3 : - $PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in -# - (1) echo $STATUS:"":$PERCENT%;; - (2) echo $STATUS:"":$PERCENT%;; - (3) echo $STATUS:"":$PERCENT%;; - (4) echo $STATUS:"":$PERCENT%;; - (5) echo $STATUS:"":$PERCENT%;; -esac - - diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 938ff1f..09b3977 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -73,8 +73,7 @@ Arc-Dark Color Scheme #pulseaudio, #temperature, #tray, -#idle_inhibitor, -#custom-PBPbattery { +#idle_inhibitor { padding:0.5rem 0.6rem; margin: 1px 0px; }