Skip to content

Commit 6cd04a5

Browse files
Push a new build
1 parent a0765cc commit 6cd04a5

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

config.def.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning
1818
static const int showsystray = 1; /* 0 means no systray */
1919
static const int showbar = 1; /* 0 means no bar */
2020
static const int topbar = 1; /* 0 means bottom bar */
21-
static const int extrabar = 1; /* 0 means no extra bar */
21+
static const int vertpad = 10; /* vertical padding of bar */
22+
static const int sidepad = 10; /* horizontal padding of bar */
2223
static const int viewontag = 1; /* 0 means don't view on tag switch */
2324
static const int useinstabar = 1; /* 0 means don't use instabar script */
2425
static const int user_bh = 28; /* 0 means that instawm will calculate bar height, >= 1 means instawm will user_bh as bar height */
@@ -139,8 +140,17 @@ static const Layout layouts[] = {
139140
};
140141

141142
static const Taglayout taglayouts[] = {
142-
/* tag layout */
143-
{ 1, {.v = &layouts[6]} },
143+
/* tag layout */
144+
{ 1, {.v = &layouts[6]} },
145+
{ 2, {.v = &layouts[0]} },
146+
{ 3, {.v = &layouts[0]} },
147+
{ 4, {.v = &layouts[0]} },
148+
{ 5, {.v = &layouts[0]} },
149+
{ 6, {.v = &layouts[0]} },
150+
{ 7, {.v = &layouts[0]} },
151+
{ 8, {.v = &layouts[0]} },
152+
{ 9, {.v = &layouts[0]} },
153+
{ 10, {.v = &layouts[0]} },
144154
};
145155

146156
/* key definitions */
@@ -237,7 +247,6 @@ static Key keys[] = {
237247
{ MODKEY, -1, XK_Return, spawn, {.v = terminalcmd } },
238248
{ ControlMask, -1, XK_Return, togglescratch, {.v = scratchpadcmd } },
239249
{ MODKEY, -1, XK_b, togglebar, {0} },
240-
{ MODKEY, -1, XK_b, toggleextrabar, {0} },
241250
{ MODKEY, -1, XK_j, focusstack, {.i = +1 } },
242251
{ MODKEY, -1, XK_k, focusstack, {.i = -1 } },
243252
{ MODKEY, -1, XK_i, incnmaster, {.i = +1 } },

instawm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ static int screen;
326326
static int sw, sh; /* X display screen geometry width, height */
327327
static int bh, blw = 0; /* bar geometry */
328328
static int lrpad; /* sum of left and right padding for text */
329+
static int vp; /* vertical padding for bar */
330+
static int sp; /* side padding for bar */
329331
static int (*xerrorxlib)(Display *, XErrorEvent *);
330332
static unsigned int numlockmask = 0;
331333
static void (*handler[LASTEvent]) (XEvent *) = {
@@ -2144,6 +2146,8 @@ setup(void)
21442146
lrpad = drw->fonts->h;
21452147
bh = user_bh ? user_bh : drw->fonts->h + 2;
21462148
updategeom();
2149+
sp = sidepad;
2150+
vp = (topbar == 1) ? vertpad : - vertpad;
21472151
/* init atoms */
21482152
utf8string = XInternAtom(dpy, "UTF8_STRING", False);
21492153
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
@@ -2323,15 +2327,12 @@ togglebar(const Arg *arg)
23232327
if (!selmon->showbar)
23242328
wc.y = -bh;
23252329
else if (selmon->showbar) {
2326-
#if BARPADDING_PATCH
23272330
wc.y = vp;
23282331
if (!selmon->topbar)
23292332
wc.y = selmon->mh - bh + vp;
2330-
#else
23312333
wc.y = 0;
23322334
if (!selmon->topbar)
23332335
wc.y = selmon->mh - bh;
2334-
#endif // BARPADDING_PATCH
23352336
}
23362337
XConfigureWindow(dpy, systray->win, CWY, &wc);
23372338
}

0 commit comments

Comments
 (0)