1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-16 01:57:09 +00:00

make no_buffers a lua setting

This commit is contained in:
Pavel Labath 2010-03-07 13:20:16 +01:00
parent d6ff7b7315
commit 357a505dc4
3 changed files with 4 additions and 10 deletions

View File

@ -373,7 +373,7 @@ static void *run_update_callback(void *data)
}
}
extern int no_buffers;
conky::simple_config_setting<bool> no_buffers("no_buffers", true, false);
void update_stuff(void)
{
@ -407,7 +407,7 @@ void update_stuff(void)
sem_wait(&uc->end_wait);
/* XXX: move the following into the update_meminfo() functions? */
if (no_buffers) {
if (no_buffers.get(*state)) {
info.mem -= info.bufmem;
info.memeasyfree += info.bufmem;
}

View File

@ -32,6 +32,7 @@
#include <string.h>
#include <sys/socket.h>
#include "text_object.h"
#include "setting.hh"
void print_to_bytes(struct text_object *, char *, int);
@ -75,7 +76,7 @@ int round_to_int_temp(float);
unsigned int round_to_int(float);
extern int no_buffers;
extern conky::simple_config_setting<bool> no_buffers;
int open_acpi_temperature(const char *name);
double get_acpi_temperature(int fd);

View File

@ -392,9 +392,6 @@ unsigned int text_buffer_size = DEFAULT_TEXT_BUFFER_SIZE;
/* UTF-8 */
bool utf8_mode = false;
/* no buffers in used memory? */
int no_buffers;
/* pad percentages to decimals? */
static int pad_percents = 0;
@ -2585,7 +2582,6 @@ static void set_default_configurations(void)
}
}
no_buffers = 1;
set_update_interval(3);
update_interval_bat = NOBATTERY;
info.music_player_interval = 1.0;
@ -3115,9 +3111,6 @@ char load_config_file(const char *f)
}
}
#endif /* BUILD_X11 */
CONF("no_buffers") {
no_buffers = string_to_bool(value);
}
#ifdef __linux__
CONF("top_name_width") {
if (set_top_name_width(value))