1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-03 20:48:31 +00:00

Fix: If there is no battery then we don't care about the status

This commit is contained in:
Nikolas Garofil 2009-07-27 13:34:20 +02:00
parent 3e41b36fdf
commit ca0f8f8712
2 changed files with 4 additions and 2 deletions

View File

@ -7138,7 +7138,7 @@ static void main_loop(void)
next_update_time = get_time();
info.looped = 0;
while (terminate == 0 && (total_run_times == 0 || info.looped < total_run_times)) {
if(update_interval_bat != update_interval_old) {
if(update_interval_bat != NOBATTERY && update_interval_bat != update_interval_old) {
char buf[max_user_text];
get_battery_short_status(buf, max_user_text, "BAT0");
@ -7888,7 +7888,7 @@ static void set_default_configurations(void)
no_buffers = 1;
update_interval = 3.0;
update_interval_old = update_interval;
update_interval_bat = update_interval;
update_interval_bat = NOBATTERY;
info.music_player_interval = 1.0;
stuff_in_uppercase = 0;
info.users.number = 1;

View File

@ -374,4 +374,6 @@ extern enum x_initialiser_state x_initialised;
#define DEFAULT_TEXT_BUFFER_SIZE_S "##DEFAULT_TEXT_BUFFER_SIZE"
#define NOBATTERY 0
#endif /* _conky_h_ */