mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
bar border - allow for the border size to be explicitly set ref. #364
This commit is contained in:
parent
99f6f1b52c
commit
ab7d28ff0f
@ -7,6 +7,12 @@ static const int corner_radius = 10;
|
|||||||
#else
|
#else
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
#endif // ROUNDED_CORNERS_PATCH
|
#endif // ROUNDED_CORNERS_PATCH
|
||||||
|
#if BAR_BORDER_PATCH
|
||||||
|
/* This allows the bar border size to be explicitly set separately from borderpx.
|
||||||
|
* If left as 0 then it will default to the borderpx value of the monitor and will
|
||||||
|
* automatically update with setborderpx. */
|
||||||
|
static const unsigned int barborderpx = 0; /* border pixel of bar */
|
||||||
|
#endif // BAR_BORDER_PATCH
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
#if SWALLOW_PATCH
|
#if SWALLOW_PATCH
|
||||||
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
|
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
|
||||||
|
4
dwm.c
4
dwm.c
@ -484,7 +484,7 @@ struct Monitor {
|
|||||||
int gappov; /* vertical outer gaps */
|
int gappov; /* vertical outer gaps */
|
||||||
#endif // VANITYGAPS_PATCH
|
#endif // VANITYGAPS_PATCH
|
||||||
#if SETBORDERPX_PATCH
|
#if SETBORDERPX_PATCH
|
||||||
unsigned int borderpx;
|
int borderpx;
|
||||||
#endif // SETBORDERPX_PATCH
|
#endif // SETBORDERPX_PATCH
|
||||||
unsigned int seltags;
|
unsigned int seltags;
|
||||||
unsigned int sellt;
|
unsigned int sellt;
|
||||||
@ -1676,7 +1676,7 @@ createmon(void)
|
|||||||
bar->showbar = 1;
|
bar->showbar = 1;
|
||||||
bar->external = 0;
|
bar->external = 0;
|
||||||
#if BAR_BORDER_PATCH
|
#if BAR_BORDER_PATCH
|
||||||
bar->borderpx = borderpx;
|
bar->borderpx = (barborderpx ? barborderpx : borderpx);
|
||||||
#else
|
#else
|
||||||
bar->borderpx = 0;
|
bar->borderpx = 0;
|
||||||
#endif // BAR_BORDER_PATCH
|
#endif // BAR_BORDER_PATCH
|
||||||
|
@ -15,13 +15,15 @@ setborderpx(const Arg *arg)
|
|||||||
int delta = 2 * (m->borderpx - prev_borderpx);
|
int delta = 2 * (m->borderpx - prev_borderpx);
|
||||||
|
|
||||||
#if BAR_BORDER_PATCH
|
#if BAR_BORDER_PATCH
|
||||||
for (bar = m->bar; bar; bar = bar->next) {
|
if (!barborderpx) {
|
||||||
bar->bh = bar->bh - 2 * bar->borderpx + 2 * m->borderpx;
|
for (bar = m->bar; bar; bar = bar->next) {
|
||||||
bar->borderpx = m->borderpx;
|
bar->bh = bar->bh - 2 * bar->borderpx + 2 * m->borderpx;
|
||||||
|
bar->borderpx = m->borderpx;
|
||||||
|
}
|
||||||
|
updatebarpos(m);
|
||||||
|
for (bar = m->bar; bar; bar = bar->next)
|
||||||
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
||||||
}
|
}
|
||||||
updatebarpos(m);
|
|
||||||
for (bar = m->bar; bar; bar = bar->next)
|
|
||||||
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
|
||||||
#endif // BAR_BORDER_PATCH
|
#endif // BAR_BORDER_PATCH
|
||||||
|
|
||||||
for (c = m->clients; c; c = c->next) {
|
for (c = m->clients; c; c = c->next) {
|
||||||
|
Loading…
Reference in New Issue
Block a user