diff --git a/awesomerc.5.txt b/awesomerc.5.txt index 9c0dcda8b..e8f357914 100644 --- a/awesomerc.5.txt +++ b/awesomerc.5.txt @@ -387,7 +387,7 @@ This widget shows a list of running windows. *mouse*:: Set mouse bindings. *styles*:: - Style section with a focus and normal subsection. + Style section with normal, focus and urgent subsections. *text_align*:: Text alignement. *show_icons*:: diff --git a/widgets/tasklist.c b/widgets/tasklist.c index c0deea71d..9c961749f 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -47,6 +47,7 @@ typedef struct { style_t normal; style_t focus; + style_t urgent; } styles; } Data; @@ -115,7 +116,12 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used) { icon_width = 0; - style = sel == c ? d->styles.focus : d->styles.normal; + if(c->isurgent) + style = d->styles.urgent; + else if(sel == c) + style = d->styles.focus; + else + style = d->styles.normal; if(d->show_icons) { @@ -286,6 +292,11 @@ tasklist_new(Statusbar *statusbar, cfg_t *config) &d->styles.focus, &globalconf.screens[statusbar->screen].styles.focus); + draw_style_init(globalconf.display, phys_screen, + cfg_getsec(cfg_styles, "urgent"), + &d->styles.urgent, + &globalconf.screens[statusbar->screen].styles.urgent); + d->align = draw_get_align(cfg_getstr(config, "text_align")); d->show_icons = cfg_getbool(config, "show_icons");