diff --git a/common/configopts.c b/common/configopts.c index 2af53c43b..33982abef 100644 --- a/common/configopts.c +++ b/common/configopts.c @@ -324,6 +324,8 @@ cfg_opt_t widget_emptybox_opts[] = CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), /** Y coordinate, do not set for auto. */ CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), + /** Widget alignment. */ + CFG_ALIGNMENT((char *) "align", (char *) "auto", CFGF_NONE), /** Mouse bindings. */ CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), /** Widget width. Set to 0 for auto. */ diff --git a/widgets/emptybox.c b/widgets/emptybox.c index d0f596352..6bfb290fa 100644 --- a/widgets/emptybox.c +++ b/widgets/emptybox.c @@ -57,6 +57,7 @@ emptybox_new(Statusbar *statusbar, cfg_t *config) w = p_new(Widget, 1); widget_common_new(w, statusbar, config); w->draw = emptybox_draw; + w->alignment = cfg_getalignment(config, "align"); w->data = d = p_new(Data, 1);