diff --git a/src/conky.c b/src/conky.c index 19ce2915..74af1398 100644 --- a/src/conky.c +++ b/src/conky.c @@ -981,11 +981,6 @@ void generate_text_internal(char *p, int p_max_size, OBJ(fs_used_perc) { print_fs_perc(obj, 0, p, p_max_size); } -#ifdef X11 - OBJ(hr) { - new_hr(obj, p, p_max_size); - } -#endif #ifdef HDDTEMP OBJ(hddtemp) { short val; @@ -1462,11 +1457,6 @@ void generate_text_internal(char *p, int p_max_size, OBJ(text) { snprintf(p, p_max_size, "%s", obj->data.s); } -#ifdef X11 - OBJ(stippled_hr) { - new_stippled_hr(obj, p, p_max_size); - } -#endif /* X11 */ OBJ(swap) { human_readable(cur->swap * 1024, p, 255); } diff --git a/src/core.c b/src/core.c index 3dbda8f0..8751f219 100644 --- a/src/core.c +++ b/src/core.c @@ -596,6 +596,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long obj->callbacks.print = &print_fs_used; END OBJ(hr, 0) obj->data.l = arg ? atoi(arg) : 1; + obj->callbacks.print = &new_hr; END OBJ(nameserver, &update_dns_data) parse_nameserver_arg(obj, arg); obj->callbacks.print = &print_nameserver; @@ -933,6 +934,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long END OBJ(stippled_hr, 0) #ifdef X11 scan_stippled_hr(obj, arg); + obj->callbacks.print = &new_stippled_hr; #endif /* X11 */ END OBJ(swap, &update_meminfo) END OBJ(swapfree, &update_meminfo)