diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c7f53..fa0cc0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ * battery: don’t terminate (causing last status to “freeze”) when failing to update; retry again later (https://codeberg.org/dnkl/yambar/issues/44). +* battery: differentiate "Not Charging" and "Discharging" in state + tag of battery module. + (https://codeberg.org/dnkl/yambar/issues/57). ### Deprecated @@ -41,6 +44,7 @@ ### Contributors * [novakane](https://codeberg.org/novakane) +* [mz](https://codeberg.org/mz) ## 1.6.1 diff --git a/doc/yambar-modules-battery.5.scd b/doc/yambar-modules-battery.5.scd index 58fa6c6..42b5e00 100644 --- a/doc/yambar-modules-battery.5.scd +++ b/doc/yambar-modules-battery.5.scd @@ -24,7 +24,7 @@ uses *udev* to monitor for changes. : Battery model name | state : string -: One of *full*, *charging*, *discharging* or *unknown* +: One of *full*, *not charging*, *charging*, *discharging* or *unknown* | capacity : range : capacity left, in percent diff --git a/examples/configurations/laptop.conf b/examples/configurations/laptop.conf index b07ed8a..593d9f3 100644 --- a/examples/configurations/laptop.conf +++ b/examples/configurations/laptop.conf @@ -271,6 +271,21 @@ bar: full: - string: {text: , foreground: 00ff00ff, font: *awesome} - string: {text: "{capacity}% full"} + not charging: + - ramp: + tag: capacity + items: + - string: {text:  , foreground: ff0000ff, font: *awesome} + - string: {text:  , foreground: ffa600ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text:  , foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}%"} - clock: time-format: "%H:%M %Z" content: