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
can info be gotten from Power Consumption Display applet?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- Logansfury
- Level 8
- Posts: 2438
- Joined: Fri Oct 27, 2023 4:08 pm
- Location: Las Vegas NV, USA
-
- Level 1
- Posts: 2
- Joined: Wed Jun 12, 2024 1:49 pm
Re: can info be gotten from Power Consumption Display applet?
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}%
#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}%
Re: can info be gotten from Power Consumption Display applet?
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