diff options
author | Adrian Kummerlaender | 2015-01-01 20:46:32 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-01-01 20:46:32 +0100 |
commit | b151106ce0b77ebcd79426c693d2d4f118966527 (patch) | |
tree | 37b08e56764de3e4ea65c90ba5281827ebfb2a33 /conky | |
parent | 8f12e5bdd0ca97ef348b8a0d80d3890474eb3362 (diff) | |
download | dotfiles-b151106ce0b77ebcd79426c693d2d4f118966527.tar dotfiles-b151106ce0b77ebcd79426c693d2d4f118966527.tar.gz dotfiles-b151106ce0b77ebcd79426c693d2d4f118966527.tar.bz2 dotfiles-b151106ce0b77ebcd79426c693d2d4f118966527.tar.lz dotfiles-b151106ce0b77ebcd79426c693d2d4f118966527.tar.xz dotfiles-b151106ce0b77ebcd79426c693d2d4f118966527.tar.zst dotfiles-b151106ce0b77ebcd79426c693d2d4f118966527.zip |
Added discharge rate display to conky battery section
* this is only displayed when actually discharging, data is provided by `upower`
Diffstat (limited to 'conky')
-rw-r--r-- | conky/.conkyrc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/conky/.conkyrc b/conky/.conkyrc index bc52864..03bbae4 100644 --- a/conky/.conkyrc +++ b/conky/.conkyrc @@ -1,6 +1,6 @@ out_to_x no out_to_console yes -update_interval 5 +update_interval 5 if_up_strictness address @@ -87,10 +87,21 @@ TEXT "full_text" : " Battery",\ "separator" : false\ },\ + ${if_match "${exec upower -i /org/freedesktop/UPower/devices/battery_BAT0 | pcregrep -o1 '^[ ]*state:[ ]*([\w]+)'}" == "discharging"}\ + {\ + "full_text" : "${battery_percent}",\ + "color" : "\#909737",\ + "separator" : false\ + },\ + {\ + "full_text" : "(${exec upower -i /org/freedesktop/UPower/devices/battery_BAT0 | pcregrep -o1 '^[ ]*energy.rate:[ ]*([\S]{1,4})'}W) "\ + },\ + ${else}\ {\ "full_text" : "${battery_percent} ",\ "color" : "\#909737"\ },\ + ${endif}\ {\ "full_text" : " ${time %Y/%m/%d}",\ "separator" : false\ |