obj->type = OBJ_text;
snprintf(buf, 256, "${%s}", s);
obj->data.s = strdup(buf);
- } else {
- obj->data.execi.cmd = strdup(arg + n);
- }
+ } else {
+ obj->data.execi.cmd = strdup(arg + n);
+ }
END OBJ(execi, 0) unsigned int n;
if (!arg
}
OBJ(execibar) {
- if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval) {
+ if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval || !obj->data.execi.last_update) {
new_bar(p, 0, 4, (int) obj->f);
} else {
char *p2 = p;
}
}
OBJ(execigraph) {
- if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval) {
+ if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval || !obj->data.execi.last_update) {
new_graph(p, 0, 25, obj->c, obj->d, (int) (obj->f), 100, 0);
} else {
char *p2 = p;
}
OBJ(execi) {
char *output = obj->data.execi.buffer;
- if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval) {
+ if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval || !obj->data.execi.last_update) {
char *output = obj->data.execi.buffer;
FILE *fp = popen(obj->data.execi.cmd, "r");
int length = fread(output, 1, TEXT_BUFFER_SIZE, fp);
if (length > 0 && output[length - 1] == '\n') {
output[length - 1] = '\0';
}
+ obj->data.execi.last_update = current_update_time;
}
parse_conky_vars(output, p, cur);
}
OBJ(texeci) {
static int running = 0;
- if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval) {
+ if (current_update_time - obj->data.execi.last_update < obj->data.execi.interval || !obj->data.execi.last_update) {
static pthread_t execthread;
if (!running) {
running = 1;