sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit c6f9ebf258152b1864d8a72e8733c1e386350732
parent 217febff00b46a700a13d67a65809b25ee04ea45
Author: Julian A <nope>
Date:   Sat,  7 Jun 2014 19:22:53 +0200

added bottom margin patch

Diffstat:
Adwm.suckless.org/patches/bottommargin.md | 13+++++++++++++
Adwm.suckless.org/patches/dwm-6.0-bottommargin.diff | 26++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/bottommargin.md b/dwm.suckless.org/patches/bottommargin.md @@ -0,0 +1,13 @@ +# bottommargin + +## Description + +Adds a variable margin at the bottom for status or notification bars + +## Download + + * [dwm-6.0-bottommargin.diff](dwm-6.0-bottommargin.diff) dwm-6.0-bottommargin.diff (07.06.2014) + +## Author + + * Julian A. diff --git a/dwm.suckless.org/patches/dwm-6.0-bottommargin.diff b/dwm.suckless.org/patches/dwm-6.0-bottommargin.diff @@ -0,0 +1,26 @@ +diff --git a/config.def.h b/config.def.h +index 77ff358..203d354 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -12,6 +12,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ + static const Bool showbar = True; /* False means no bar */ + static const Bool topbar = True; /* False means bottom bar */ ++static const unsigned int bottommargin = 20; /* Margin at the bottom for another bar */ + + /* tagging */ + static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; +diff --git a/dwm.c b/dwm.c +index 1d78655..cece290 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -1841,6 +1841,9 @@ updatebarpos(Monitor *m) { + m->wh = m->mh; + if(m->showbar) { + m->wh -= bh; ++ m->wh -= marginbottom; ++ if(!m->topbar) ++ m->wy += marginbottom; + m->by = m->topbar ? m->wy : m->wy + m->wh; + m->wy = m->topbar ? m->wy + bh : m->wy; + }