Rename bar margins - dwm - my version of dwm (frankenstein's monster)
 (HTM) git clone https://git.drkhsh.at/dwm.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit f1a6eed14ff8dd8b0bc99610ea3bfdc32cc785f0
 (DIR) parent dd8bca0577010d1c7787647ec33af189c3876f75
 (HTM) Author: drkhsh <me@drkhsh.at>
       Date:   Fri, 20 Jan 2023 22:58:34 +0100
       
       Rename bar margins
       
       Diffstat:
         M config.def.h                        |       4 ++--
         M dwm.c                               |      18 +++++++++---------
       
       2 files changed, 11 insertions(+), 11 deletions(-)
       ---
 (DIR) diff --git a/config.def.h b/config.def.h
       @@ -14,8 +14,8 @@ static const unsigned int gappov    = 30;       /* vert outer gap between window
        static const int smartgaps          = 0;        /* 1 means no outer gap when there is only one window */
        static const int showbar            = 1;        /* 0 means no bar */
        static const int topbar             = 1;        /* 0 means bottom bar */
       -static       int vp                 = 10;       /* vertical padding of bar */
       -static       int sp                 = 10;       /* horizontal padding of bar */
       +static const int vertmarginbar      = 10;       /* vertical margin of bar */
       +static const int horizmarginbar     = 10;       /* horizontal margin of bar */
        static const int horizpadbar        = 2;        /* horizontal padding for statusbar */
        static const int vertpadbar         = 0;        /* vertical padding for statusbar */
        static const unsigned int systraypinning = 0;   /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
 (DIR) diff --git a/dwm.c b/dwm.c
       @@ -1002,7 +1002,7 @@ drawbar(Monitor *m)
                if (showsystray && m == systraytomon(m)) {
                        stw = getsystraywidth();
                        drw_setscheme(drw, scheme[SchemeNorm]);
       -                drw_rect(drw, m->ww - stw - (vp*2), 0, stw, bh, 1, 1);
       +                drw_rect(drw, m->ww - stw - (vertmarginbar * 2), 0, stw, bh, 1, 1);
                }
        
                /* draw status first so it can be overdrawn by tags later */
       @@ -2211,9 +2211,9 @@ togglebar(const Arg *arg)
                        if (!selmon->showbar)
                                wc.y = -bh;
                        else if (selmon->showbar) {
       -                        wc.y = vp;
       +                        wc.y = vertmarginbar;
                                if (!selmon->topbar)
       -                                wc.y = selmon->mh - bh + vp;
       +                                wc.y = selmon->mh - bh + vertmarginbar;
                        }
                        XConfigureWindow(dpy, systray->win, CWY, &wc);
                }
       @@ -2433,18 +2433,18 @@ updatebarpos(Monitor *m)
                m->wy = m->my;
                m->ww = m->mw;
                m->wh = m->mh;
       -        m->bx = m->wx + vp;
       -        m->bw = m->ww - 2 * vp;
       +        m->bx = m->wx + vertmarginbar;
       +        m->bw = m->ww - 2 * vertmarginbar;
        
                if (!m->showbar) {
       -                m->by = -bh - sp;
       +                m->by = -bh - horizmarginbar;
                        return;
                }
        
                if (m->topbar)
       -                m->wy = m->wy + bh + sp;
       +                m->wy = m->wy + bh + horizmarginbar;
        
       -        m->wh -= sp + bh;
       +        m->wh -= horizmarginbar + bh;
                m->by = (m->topbar ? m->wy - bh : m->wy + m->wh);
        }
        
       @@ -2617,7 +2617,7 @@ updatesystray(int updatebar)
                Monitor *m = systraytomon(NULL);
                unsigned int x = m->mx + m->mw;
                unsigned int w = 1, xpad = 0;
       -        xpad = sp;
       +        xpad = horizmarginbar;
        
                if (!showsystray)
                        return;