extern void togglefloat(Arg *arg); /* toggles focusesd client between floating/non-floating state */
extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */
extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */
+extern void updatemodetext(void); /* updates mtext */
extern void view(Arg *arg); /* views the tag with arg's index */
extern void zoom(Arg *arg); /* zooms the focused client to master area, arg is ignored */
sh = DisplayHeight(dpy, screen);
master = MASTER;
nmaster = NMASTER;
- snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster);
- bmw = textw(mtext);
+ updatemodetext();
/* bar */
bx = sx;
by = sy;
if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh))
return;
nmaster += arg->i;
- snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster);
- bmw = textw(mtext);
+ updatemodetext();
if(sel)
arrange();
else
void
togglemode(Arg *arg) {
arrange = (arrange == dofloat) ? dotile : dofloat;
- snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster);
- bmw = textw(mtext);
+ updatemodetext();
if(sel)
arrange();
else
arrange();
}
+void
+updatemodetext() {
+ snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster);
+ bmw = textw(mtext);
+}
+
void
view(Arg *arg) {
unsigned int i;