feat(waybar): update battery module

* Remove `format-charging` and `format-plugged` settings in favor of just using the graduated battery level icons. Also  is a depreciated/removed Nerd Font icon. If we want to visually differentiate the charging state, CSS rules in `~/.config/waybar/style.css` might be a better way to handle that.
* Remove the commented lines because it is unlikely we will ever want these specific settings.
* Remove PBPbattery module and associated script. It is all commented out anyway. This feature has been built-in to Waybar for some time now; a custom script is no longer needed.
This commit is contained in:
BluishHumility
2024-07-29 21:45:02 -04:00
parent ceaf04e7b1
commit 8234c3750c
3 changed files with 3 additions and 36 deletions

View File

@@ -23,7 +23,6 @@
"pulseaudio", "pulseaudio",
"custom/keyboard-layout", "custom/keyboard-layout",
"battery", "battery",
//"custom/PBPbattery",
"backlight#icon", "backlight#icon",
"backlight#value", "backlight#value",
"clock", "clock",
@@ -44,23 +43,13 @@
"battery": { "battery": {
"states": { "states": {
// "good": 95,
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
"format": "{capacity}% {icon}", "format": "{icon} {capacity}%",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]
}, },
"custom/PBPbattery": {
"exec": "~/.config/waybar/scripts/PBPbattery.sh",
"format": "{}",
},
"clock": { "clock": {
"interval": 10, "interval": 10,
"format-alt": " {:%e %b %Y}", // Icon: calendar-alt "format-alt": " {:%e %b %Y}", // Icon: calendar-alt

View File

@@ -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

View File

@@ -73,8 +73,7 @@ Arc-Dark Color Scheme
#pulseaudio, #pulseaudio,
#temperature, #temperature,
#tray, #tray,
#idle_inhibitor, #idle_inhibitor {
#custom-PBPbattery {
padding:0.5rem 0.6rem; padding:0.5rem 0.6rem;
margin: 1px 0px; margin: 1px 0px;
} }