I did not find any clue about this in the chdkptp sources:
could we get the status of the battery via chdkptp ? So that it can be displayed in the gui ?
You can get battery voltage using the camera side lua function get_vbatt()
However, there a few problems with displaying this in the GUI
1) Only one script can run at a time, so periodically polling the voltage from the GUI could fail, or interfere with other scripts.
2) To turn it into a status, you need to know the voltage range for the cameras particular battery type. You could use the battery low and battery high values from get_config_value to the range.
In some situations, using the live view to see the CHDK battery OSD might be an option.