X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbattery%2Fbattery.c;h=4bbde3cb2763fb6e3a1b529435e50eae85acd367;hb=35dc866951d48409e88a1fde5fdb52dfe60f3b18;hp=5480412ada524ba8d173fe85ef463e1532ba520f;hpb=f7f08a5ff9430a8ef6f09e723d30a36a47e96bb0;p=chaz%2Ftint2 diff --git a/src/battery/battery.c b/src/battery/battery.c index 5480412..4bbde3c 100644 --- a/src/battery/battery.c +++ b/src/battery/battery.c @@ -39,6 +39,7 @@ #include "battery.h" #include "clock.h" #include "timer.h" +#include "common.h" PangoFontDescription *bat1_font_desc; PangoFontDescription *bat2_font_desc; @@ -352,8 +353,8 @@ void update_battery() { new_percentage = (energy_now*100)/energy_full; if(battery_low_status > new_percentage && battery_state.state == BATTERY_DISCHARGING && !battery_low_cmd_send) { - system(battery_low_cmd); // return value == -1, since we've set SIGCHLD to SIGIGN - battery_low_cmd_send = 1; + tint_exec(battery_low_cmd); + battery_low_cmd_send = 1; } if(battery_low_status < new_percentage && battery_state.state == BATTERY_CHARGING && battery_low_cmd_send) { battery_low_cmd_send = 0;