diff --git a/config.c b/config.c index f07e485c..c608cc69 100644 --- a/config.c +++ b/config.c @@ -319,13 +319,13 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf) tmp = cfg_getstr(cfg_statusbar, "position"); if(tmp && !a_strncmp(tmp, "off", 6)) - awesomeconf->statusbar_default_position = BarOff; + awesomeconf->statusbar.dposition = BarOff; else if(tmp && !a_strncmp(tmp, "bottom", 6)) - awesomeconf->statusbar_default_position = BarBot; + awesomeconf->statusbar.dposition = BarBot; else - awesomeconf->statusbar_default_position = BarTop; + awesomeconf->statusbar.dposition = BarTop; - awesomeconf->statusbar.position = awesomeconf->statusbar_default_position; + awesomeconf->statusbar.position = awesomeconf->statusbar.dposition; /* Layouts */ diff --git a/config.h b/config.h index 7cc093ad..9223c07c 100644 --- a/config.h +++ b/config.h @@ -70,6 +70,8 @@ typedef struct int height; /** Layout txt width */ int txtlayoutwidth; + /** Default position */ + int dposition; /** Bar position */ int position; /** Window */ @@ -172,8 +174,6 @@ struct awesome_config KeySym modkey; /** Numlock mask */ unsigned int numlockmask; - /** Default status bar position */ - int statusbar_default_position; /** Border size */ int borderpx; /** Master width factor */ diff --git a/statusbar.c b/statusbar.c index 4826d552..a0123ee1 100644 --- a/statusbar.c +++ b/statusbar.c @@ -230,7 +230,7 @@ uicb_togglebar(awesome_config *awesomeconf, const char *arg __attribute__ ((unused))) { if(awesomeconf->statusbar.position == BarOff) - awesomeconf->statusbar.position = (awesomeconf->statusbar_default_position == BarOff) ? BarTop : awesomeconf->statusbar_default_position; + awesomeconf->statusbar.position = (awesomeconf->statusbar.dposition == BarOff) ? BarTop : awesomeconf->statusbar.dposition; else awesomeconf->statusbar.position = BarOff; updatebarpos(awesomeconf->display, awesomeconf->statusbar);