can info be gotten from Power Consumption Display applet?

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
User avatar
Logansfury
Level 8
Level 8
Posts: 2438
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

can info be gotten from Power Consumption Display applet?

Post by Logansfury »

Hello everyone,

I have noted that the applet Power Consumption Display recognizes the state changing from charging to discharging and vice versa about 3-4 mins sooner than the default battery icon in systray.

Is there a way for conky to make use of PCD and query it for battery status?

thanks for reading :)

Logan
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
oscar buzzby
Level 1
Level 1
Posts: 2
Joined: Wed Jun 12, 2024 1:49 pm

Re: can info be gotten from Power Consumption Display applet?

Post by oscar buzzby »

may have to tweek, not sure what you want.......

#battery on line or not
${voffset -15}${if_existing /sys/class/power_supply/AC/online 0}${color white}AC is${color red} off-line $battery
${else}
${if_existing /sys/class/power_supply/AC/online 1}${voffset -15}${color white}AC is${color green} on $battery
${color}${endif}${endif}

another piece
#battery how long charge
${voffset -35}${if_existing /sys/class/power_supply/AC/online 1}${color white}${color green}Untill Full charge ${battery_time BAT0}
${else}
${if_existing /sys/class/power_supply/AC/online 0}${voffset -15}${color white}Charge time remaining ${color red}${battery_time BAT0}
${color}${endif}${endif}

either BAT0 or BAT1

one more piece

#battery bar and percent
${if_match ${battery_percent}<30}${voffset -10}${color white}Bat ${color red} ${blink battery dying}
${else}
${if_match ${battery_percent}<80}${voffset -30}${color white}Bat ${color yellow}${battery_bar 10,200 BAT0}
${else}
${voffset -50}${if_match ${battery_percent}>=80}${color white}Bat ${color green}${battery_bar 10,200 BAT0}
${else}
${if_match "${battery_short}"<"D"}d ${color red}${battery_bar 10,130 BAT0}
${endif}${endif}${endif}${endif}${alignr}${voffset -20}${battery_percent BAT0}%
User avatar
Koentje
Level 8
Level 8
Posts: 2088
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: can info be gotten from Power Consumption Display applet?

Post by Koentje »

Logansfury wrote: Sun May 26, 2024 10:48 am ...about 3-4 mins sooner...
Minutes??? When i plug the charger in my laptop i see almost immediate change! Within seconds..
I believe you already downloaded this conky, but you can try if it also is slow in state changes.

https://www.cobrasoft.nl/download/conky/laptop-battery

Image

Image
Image
Post Reply

Return to “Compiz, Conky, Docks & Widgets”