Skip to content

Commit

Permalink
feat(waybar): update battery module
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
BluishHumility committed Jul 30, 2024
1 parent ceaf04e commit 8234c37
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 36 deletions.
15 changes: 2 additions & 13 deletions .config/waybar/config
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"pulseaudio",
"custom/keyboard-layout",
"battery",
//"custom/PBPbattery",
"backlight#icon",
"backlight#value",
"clock",
Expand All @@ -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
Expand Down
21 changes: 0 additions & 21 deletions .config/waybar/scripts/PBPbattery.sh

This file was deleted.

3 changes: 1 addition & 2 deletions .config/waybar/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8234c37

Please sign in to comment.