#include "taskbar.h"
#include "battery.h"
#include "clock.h"
+#include "timer.h"
PangoFontDescription *bat1_font_desc=0;
PangoFontDescription *bat2_font_desc=0;
char *path_current_now=0;
char *path_status=0;
+void update_batterys()
+{
+ int i;
+ update_battery();
+ for (i=0 ; i < nb_panel ; i++)
+ panel1[i].battery.area.resize = 1;
+}
+
void init_battery()
{
g_free(path1);
g_free(battery_dir);
+
+ if (battery_enabled)
+ install_timer(0, 1000000, 5, 0, update_batterys);
}
{
Panel *panel = (Panel*)p;
Battery *battery = &panel->battery;
- FILE *fp;
int bat_percentage_height, bat_percentage_height_ink, bat_time_height, bat_time_height_ink;
if (!battery_enabled)
FILE *fp;
char tmp[25];
int64_t energy_now = 0, energy_full = 0, current_now = 0;
- int i, seconds = 0;
+ int seconds = 0;
int8_t new_percentage = 0;
fp = fopen(path_status, "r");