move uicb_togglebar to statusbar.c
This commit is contained in:
parent
56a387ec5c
commit
3e3f213b72
4
config.c
4
config.c
|
@ -32,6 +32,7 @@
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "statusbar.h"
|
||||||
#include "layouts/tile.h"
|
#include "layouts/tile.h"
|
||||||
#include "layouts/spiral.h"
|
#include "layouts/spiral.h"
|
||||||
#include "layouts/floating.h"
|
#include "layouts/floating.h"
|
||||||
|
@ -100,7 +101,6 @@ static const NameFuncLink KeyfuncList[] = {
|
||||||
{"viewprevtags", uicb_viewprevtags},
|
{"viewprevtags", uicb_viewprevtags},
|
||||||
/* layout.c */
|
/* layout.c */
|
||||||
{"setlayout", uicb_setlayout},
|
{"setlayout", uicb_setlayout},
|
||||||
{"togglebar", uicb_togglebar},
|
|
||||||
{"focusnext", uicb_focusnext},
|
{"focusnext", uicb_focusnext},
|
||||||
{"focusprev", uicb_focusprev},
|
{"focusprev", uicb_focusprev},
|
||||||
{"togglemax", uicb_togglemax},
|
{"togglemax", uicb_togglemax},
|
||||||
|
@ -113,6 +113,8 @@ static const NameFuncLink KeyfuncList[] = {
|
||||||
{"setncols", uicb_setncols},
|
{"setncols", uicb_setncols},
|
||||||
/* awesome.c */
|
/* awesome.c */
|
||||||
{"quit", uicb_quit},
|
{"quit", uicb_quit},
|
||||||
|
/* statusbar.c */
|
||||||
|
{"togglebar", uicb_togglebar},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
14
layout.c
14
layout.c
|
@ -191,20 +191,6 @@ uicb_setlayout(Display *disp,
|
||||||
awesomeconf->tag_layouts[j] = awesomeconf->current_layout;
|
awesomeconf->tag_layouts[j] = awesomeconf->current_layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
uicb_togglebar(Display *disp,
|
|
||||||
DC *drawcontext,
|
|
||||||
awesome_config *awesomeconf,
|
|
||||||
const char *arg __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
if(awesomeconf->statusbar.position == BarOff)
|
|
||||||
awesomeconf->statusbar.position = (awesomeconf->statusbar.position == BarOff) ? BarTop : awesomeconf->statusbar_default_position;
|
|
||||||
else
|
|
||||||
awesomeconf->statusbar.position = BarOff;
|
|
||||||
updatebarpos(disp, awesomeconf->statusbar);
|
|
||||||
arrange(disp, drawcontext, awesomeconf);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
maximize(int x, int y, int w, int h, DC *drawcontext, awesome_config *awesomeconf)
|
maximize(int x, int y, int w, int h, DC *drawcontext, awesome_config *awesomeconf)
|
||||||
{
|
{
|
||||||
|
|
1
layout.h
1
layout.h
|
@ -34,7 +34,6 @@ void restack(Display *, DC *, awesome_config *); /* restores z layers of
|
||||||
void uicb_focusnext(Display *, DC *, awesome_config *, const char *); /* focuses next visible client */
|
void uicb_focusnext(Display *, DC *, awesome_config *, const char *); /* focuses next visible client */
|
||||||
void uicb_focusprev(Display *, DC *, awesome_config *, const char *); /* focuses prev visible client */
|
void uicb_focusprev(Display *, DC *, awesome_config *, const char *); /* focuses prev visible client */
|
||||||
void uicb_setlayout(Display *, DC *, awesome_config *, const char *); /* sets layout, NULL means next layout */
|
void uicb_setlayout(Display *, DC *, awesome_config *, const char *); /* sets layout, NULL means next layout */
|
||||||
void uicb_togglebar(Display *, DC *, awesome_config *, const char *); /* shows/hides the bar */
|
|
||||||
void uicb_togglemax(Display *, DC *, awesome_config *, const char *); /* toggles maximization of floating client */
|
void uicb_togglemax(Display *, DC *, awesome_config *, const char *); /* toggles maximization of floating client */
|
||||||
void uicb_toggleverticalmax(Display *, DC *, awesome_config *, const char *);
|
void uicb_toggleverticalmax(Display *, DC *, awesome_config *, const char *);
|
||||||
void uicb_togglehorizontalmax(Display *, DC *, awesome_config *, const char *);
|
void uicb_togglehorizontalmax(Display *, DC *, awesome_config *, const char *);
|
||||||
|
|
15
statusbar.c
15
statusbar.c
|
@ -112,3 +112,18 @@ updatebarpos(Display *disp, Statusbar statusbar)
|
||||||
XSync(disp, False);
|
XSync(disp, False);
|
||||||
while(XCheckMaskEvent(disp, EnterWindowMask, &ev));
|
while(XCheckMaskEvent(disp, EnterWindowMask, &ev));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
uicb_togglebar(Display *disp,
|
||||||
|
DC *drawcontext,
|
||||||
|
awesome_config *awesomeconf,
|
||||||
|
const char *arg __attribute__ ((unused)))
|
||||||
|
{
|
||||||
|
if(awesomeconf->statusbar.position == BarOff)
|
||||||
|
awesomeconf->statusbar.position = (awesomeconf->statusbar.position == BarOff) ? BarTop : awesomeconf->statusbar_default_position;
|
||||||
|
else
|
||||||
|
awesomeconf->statusbar.position = BarOff;
|
||||||
|
updatebarpos(disp, awesomeconf->statusbar);
|
||||||
|
arrange(disp, drawcontext, awesomeconf);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
|
|
||||||
void drawstatusbar(Display *, DC *, awesome_config *);
|
void drawstatusbar(Display *, DC *, awesome_config *);
|
||||||
void updatebarpos(Display *, Statusbar);
|
void updatebarpos(Display *, Statusbar);
|
||||||
|
void uicb_togglebar(Display *, DC *, awesome_config *, const char *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue