From: Jason Woofenden Date: Mon, 5 Mar 2018 19:00:04 +0000 (-0500) Subject: gutter between master and slaves X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=commitdiff_plain;h=3c838bad8f1825b710ea0f2acaa184391db12de2 gutter between master and slaves --- diff --git a/dwm.c b/dwm.c index e66ace8..e1ea9b4 100644 --- a/dwm.c +++ b/dwm.c @@ -1751,7 +1751,7 @@ kbspawn(const Arg *arg) { void spawn(const Arg *arg) { int tag = 0, i; - if(arg->v == termcmd) { + if(arg->v == termcmd || arg->v == runcmd) { for(i = 0; i < 32; ++i) { if(selmon->tagset[selmon->seltags] & (1 << i)) { tag = i; @@ -1759,7 +1759,7 @@ spawn(const Arg *arg) { } } WORKSPACE_NUMBER[17] = workspace_numbers_str[tag][0]; - WORKSPACE_NUMBER[18] = workspace_numbers_str[tag][1]; + WORKSPACE_NUMBER[18] = workspace_numbers_str[tag][1]; // 2nd digit or null } if(arg->v == dmenucmd) dmenumon[0] = '0' + selmon->num; @@ -1823,6 +1823,7 @@ tile(Monitor *m) { #define TAB_HEIGHT 19 #define TAB_PAD 7 +#define GUTTER_PX 8 void jason_layout(Monitor *m) { @@ -1858,7 +1859,7 @@ jason_layout(Monitor *m) { } else { mw = m->ww; } - right_width = m->ww - mw; + right_width = m->ww - mw - GUTTER_PX; tab_count = &(tab_counts[0]); tab_top = m->wy - (m->wh - (2 * (TAB_HEIGHT + TAB_PAD))) + TAB_HEIGHT; for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { @@ -1866,14 +1867,14 @@ jason_layout(Monitor *m) { resize(c, m->wx, m->wy, mw, m->wh, False, 0); } else { if (c == vis_slave) { - resize(c, m->wx + mw, m->wy + TAB_HEIGHT + TAB_PAD, right_width, m->wh - 2 * (TAB_HEIGHT + TAB_PAD), False, base); + resize(c, m->wx + mw + GUTTER_PX, m->wy + TAB_HEIGHT + TAB_PAD, right_width, m->wh - 2 * (TAB_HEIGHT + TAB_PAD), False, base); tab_count = &(tab_counts[1]); tab_top = m->wy + m->wh - TAB_HEIGHT; cur_tab = 0; } else { // this function does not get called when focus changes // resize(c, m->wx + m->ww, m->wy, m->ww - mw, m->wh, False); - resize(c, m->wx + mw + right_width * cur_tab / (*tab_count), tab_top, right_width, m->wh - 2 * (TAB_HEIGHT + TAB_PAD), False, base); + resize(c, m->wx + mw + GUTTER_PX + right_width * cur_tab / (*tab_count), tab_top, right_width, m->wh - 2 * (TAB_HEIGHT + TAB_PAD), False, base); cur_tab += 1; } }