diff --git a/src/conky.c b/src/conky.c index 4efe7a6c..5695a68e 100644 --- a/src/conky.c +++ b/src/conky.c @@ -3612,8 +3612,18 @@ static void generate_text_internal(char *p, int p_max_size, } } OBJ(wireless_link_bar) { - new_bar(p, obj->a, obj->b, ((double) obj->data.net->link_qual / - obj->data.net->link_qual_max) * 255.0); +#ifdef X11 + if(output_methods & TO_X) { + new_bar(p, obj->a, obj->b, ((double) obj->data.net->link_qual / + obj->data.net->link_qual_max) * 255.0); + }else{ +#endif /* X11 */ + if(!obj->a) obj->a = DEFAULT_BAR_WIDTH_NO_X; + new_bar_in_shell(p, p_max_size, ((double) obj->data.net->link_qual / + obj->data.net->link_qual_max) * 100.0, obj->a); +#ifdef X11 + } +#endif /* X11 */ } #endif /* HAVE_IWLIB */ diff --git a/src/text_object.h b/src/text_object.h index c2037b7b..b5d2bcdf 100644 --- a/src/text_object.h +++ b/src/text_object.h @@ -177,9 +177,7 @@ enum text_object_type { OBJ_wireless_link_qual, OBJ_wireless_link_qual_max, OBJ_wireless_link_qual_perc, -#ifdef X11 OBJ_wireless_link_bar, -#endif /* X11 */ #endif /* __linux__ */ #if defined(__FreeBSD__) || defined(__linux__) OBJ_if_up,