Add toggle up/down bar (not work)

This commit is contained in:
BitHeaven 2024-08-24 20:50:57 +05:00
parent 866d2f9d30
commit 7a8b272500
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ static const unsigned int gappx = 15; /* gaps between windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int showextrabar = 1; /* 0 means no extra bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int topbar = 0; /* 0 means bottom bar */
static const char statussep = ';';
static const int horizpadbar = 8; /* horizontal padding for statusbar */
static const int vertpadbar = 12; /* vertical padding for statusbar */

8
dwm.c
View File

@ -2013,19 +2013,19 @@ updatebarpos(Monitor *m)
if (m->showbar) {
m->wh -= bh * m->showbar;
m->by = m->wy - bh - gappx;
m->by = topbar ? m->wy - bh - gappx : m->wy + m->wh;
m->wh = m->wh - gappx;
}
else
m->by = -bh - gappx;
m->by = topbar ? -bh - gappx : -bh + gappx;
if (m->showextrabar) {
m->wh -= bh * m->showextrabar;
m->eby = m->wy + m->wh;
m->eby = !topbar ? m->wy - bh - gappx : m->wy + m->wh;
m->wh = m->wh - gappx;
}
else
m->eby = -bh + gappx;
m->eby = !topbar ? -bh - gappx : -bh + gappx;
}
void