move statusbar_default_position in Statusbar struct
This commit is contained in:
parent
101e1783d8
commit
602d92d8b2
8
config.c
8
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 */
|
||||
|
||||
|
|
4
config.h
4
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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue