From 89fa270bca078a5524af5f3e70bc68819889b05a Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 24 Sep 2007 17:08:47 +0200 Subject: [PATCH] display layout nmaster/ncols vars in new tags without clients --- statusbar.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/statusbar.c b/statusbar.c index 969b73ca..a8891c4c 100644 --- a/statusbar.c +++ b/statusbar.c @@ -19,11 +19,14 @@ * */ +#include + #include "layout.h" #include "statusbar.h" #include "draw.h" #include "screen.h" #include "util.h" +#include "layouts/tile.h" extern Client *clients, *sel, *stack; /* global client list and stack */ @@ -48,6 +51,7 @@ void drawstatusbar(Display *disp, DC *drawcontext, awesome_config * awesomeconf) { int x, i; + drawcontext->x = drawcontext->y = 0; for(i = 0; i < awesomeconf->ntags; i++) { @@ -86,6 +90,12 @@ drawstatusbar(Display *disp, DC *drawcontext, awesome_config * awesomeconf) if(sel->isfloating) drawsquare(disp, *drawcontext, awesomeconf->statusbar.drawable, sel->ismax, drawcontext->sel[ColFG]); } + else if(IS_ARRANGE(layout_tile) || IS_ARRANGE(layout_tileleft)) + { + char buf[256]; + snprintf(buf, sizeof(buf), "nmaster: %d ncols: %d", awesomeconf->nmaster, awesomeconf->ncols); + drawtext(disp, *drawcontext, awesomeconf->statusbar.drawable, buf, drawcontext->norm); + } else drawtext(disp, *drawcontext, awesomeconf->statusbar.drawable, NULL, drawcontext->norm); }