few extra barpadding options
This commit is contained in:
parent
042a547a7d
commit
bd7955f105
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
speedwm.bar.height: 3 ! Height of the bar in pixels (<num>)
|
speedwm.bar.height: 3 ! Height of the bar in pixels (<num>)
|
||||||
speedwm.bar.position: 1 ! Position of the bar (0: Bottom, 1: Top)
|
speedwm.bar.position: 1 ! Position of the bar (0: Bottom, 1: Top)
|
||||||
speedwm.bar.paddingh: 10 ! Horizontal padding (extra space) around the bar in pixels (<num>)
|
speedwm.bar.paddingoh: 10 ! Horizontal padding (extra space) around the bar in pixels (<num>)
|
||||||
speedwm.bar.paddingv: 10 ! Vertical padding (extra space) around the bar in pixels (<num>)
|
speedwm.bar.paddingov: 10 ! Vertical padding (extra space) around the bar in pixels (<num>)
|
||||||
|
speedwm.bar.paddingih: 0 ! Horizontal padding (extra space) inside the bar in pixels (<num>)
|
||||||
|
speedwm.bar.paddingiv: 0 ! Vertical padding (extra space) inside the bar in pixels (<num>)
|
||||||
|
|
||||||
!! Bar module options
|
!! Bar module options
|
||||||
|
|
||||||
|
@ -196,17 +198,16 @@ speedwm.icon.size: 10 ! Size of the window icon in the taskba
|
||||||
speedwm.icon.spacing: 5 ! Spacing between icon and text in the taskbar (<num>)
|
speedwm.icon.spacing: 5 ! Spacing between icon and text in the taskbar (<num>)
|
||||||
|
|
||||||
!! Layout options
|
!! Layout options
|
||||||
|
!!
|
||||||
!! Deck layout
|
!! Deck layout
|
||||||
|
|
||||||
speedwm.layout.deck.count: 0 ! Enable deck count in the deck layout (0/1)
|
speedwm.layout.deck.count: 0 ! Enable deck count in the deck layout (0/1)
|
||||||
|
|
||||||
speedwm.layout.deck.format: [%d]
|
speedwm.layout.deck.format: [%d]
|
||||||
|
|
||||||
!! Monocle layout
|
!! Monocle layout
|
||||||
|
|
||||||
speedwm.layout.monocle.clientcount: 0 ! Enable client count in the monocle layout (0/1)
|
speedwm.layout.monocle.clientcount: 0 ! Enable client count in the monocle layout (0/1)
|
||||||
speedwm.layout.monocle.count: 0 ! Enable focused client and number of total clients in the monocle layout (0/1)
|
speedwm.layout.monocle.count: 0 ! Enable focused client and number of total clients in the monocle layout (0/1)
|
||||||
|
|
||||||
speedwm.layout.monocle.format: [%d/%d]
|
speedwm.layout.monocle.format: [%d/%d]
|
||||||
|
|
||||||
!! mfact options
|
!! mfact options
|
||||||
|
|
|
@ -97,8 +97,10 @@ static int iconspacing = 5; /* Spacing between the title
|
||||||
/* Bar options */
|
/* Bar options */
|
||||||
static int barposition = 1; /* Bar position. Top: 1, Bottom: 0 */
|
static int barposition = 1; /* Bar position. Top: 1, Bottom: 0 */
|
||||||
static int barheight = 3; /* Bar height in pixels, 0 = calculate automatically */
|
static int barheight = 3; /* Bar height in pixels, 0 = calculate automatically */
|
||||||
static int barpaddingv = 10; /* Vertical bar padding in pixels. */
|
static int barpaddingov = 10; /* Vertical outer bar padding in pixels. */
|
||||||
static int barpaddingh = 10; /* Horizontal bar padding in pixels. */
|
static int barpaddingoh = 10; /* Horizontal outer bar padding in pixels. */
|
||||||
|
static int barpaddingiv = 0; /* Vertical inner bar padding in pixels. */
|
||||||
|
static int barpaddingih = 5; /* Horizontal inner bar padding in pixels. */
|
||||||
|
|
||||||
/* Title options */
|
/* Title options */
|
||||||
static int titleposition = 1; /* Title position. (0: Left, 1: Center) */
|
static int titleposition = 1; /* Title position. (0: Left, 1: Center) */
|
||||||
|
|
16
signal.h
16
signal.h
|
@ -102,17 +102,17 @@ static Signal signals[] = {
|
||||||
{ 87, setbarheight, {.i = +1 } },
|
{ 87, setbarheight, {.i = +1 } },
|
||||||
{ 88, setbarheight, {.i = -1 } },
|
{ 88, setbarheight, {.i = -1 } },
|
||||||
{ 89, resetbarheight, {0} },
|
{ 89, resetbarheight, {0} },
|
||||||
{ 90, setbarpaddingv, {.i = +1 } },
|
{ 90, setbarpaddingov, {.i = +1 } },
|
||||||
{ 91, setbarpaddingv, {.i = -1 } },
|
{ 91, setbarpaddingov, {.i = -1 } },
|
||||||
{ 92, setbarpaddingh, {.i = +1 } },
|
{ 92, setbarpaddingoh, {.i = +1 } },
|
||||||
{ 93, setbarpaddingh, {.i = -1 } },
|
{ 93, setbarpaddingoh, {.i = -1 } },
|
||||||
{ 94, setbarpadding, {.i = +1 } },
|
{ 94, setbarpadding, {.i = +1 } },
|
||||||
{ 95, setbarpadding, {.i = -1 } },
|
{ 95, setbarpadding, {.i = -1 } },
|
||||||
{ 96, togglebarpaddingv, {0} },
|
{ 96, togglebarpaddingov, {0} },
|
||||||
{ 97, togglebarpaddingh, {0} },
|
{ 97, togglebarpaddingoh, {0} },
|
||||||
{ 98, togglebarpadding, {0} },
|
{ 98, togglebarpadding, {0} },
|
||||||
{ 99, resetbarpaddingv, {0} },
|
{ 99, resetbarpaddingov, {0} },
|
||||||
{ 100, resetbarpaddingh, {0} },
|
{ 100, resetbarpaddingoh, {0} },
|
||||||
{ 101, resetbarpadding, {0} },
|
{ 101, resetbarpadding, {0} },
|
||||||
{ 102, incstackcount, {.i = +1 } },
|
{ 102, incstackcount, {.i = +1 } },
|
||||||
{ 103, incstackcount, {.i = -1 } },
|
{ 103, incstackcount, {.i = -1 } },
|
||||||
|
|
60
speedwm.c
60
speedwm.c
|
@ -688,14 +688,14 @@ static void setbpgaps(const Arg *arg);
|
||||||
static void resetbpgaps(const Arg *arg);
|
static void resetbpgaps(const Arg *arg);
|
||||||
|
|
||||||
/* barpadding */
|
/* barpadding */
|
||||||
static void setbarpaddingv(const Arg *arg);
|
static void setbarpaddingov(const Arg *arg);
|
||||||
static void setbarpaddingh(const Arg *arg);
|
static void setbarpaddingoh(const Arg *arg);
|
||||||
static void setbarpadding(const Arg *arg);
|
static void setbarpadding(const Arg *arg);
|
||||||
static void resetbarpaddingv(const Arg *arg);
|
static void resetbarpaddingov(const Arg *arg);
|
||||||
static void resetbarpaddingh(const Arg *arg);
|
static void resetbarpaddingoh(const Arg *arg);
|
||||||
static void resetbarpadding(const Arg *arg);
|
static void resetbarpadding(const Arg *arg);
|
||||||
static void togglebarpaddingv(const Arg *arg);
|
static void togglebarpaddingov(const Arg *arg);
|
||||||
static void togglebarpaddingh(const Arg *arg);
|
static void togglebarpaddingoh(const Arg *arg);
|
||||||
static void togglebarpadding(const Arg *arg);
|
static void togglebarpadding(const Arg *arg);
|
||||||
|
|
||||||
/* mouse */
|
/* mouse */
|
||||||
|
@ -3031,15 +3031,15 @@ showhide(Client *c)
|
||||||
void
|
void
|
||||||
resetbarpadding(const Arg *arg)
|
resetbarpadding(const Arg *arg)
|
||||||
{
|
{
|
||||||
resetbarpaddingv(NULL);
|
resetbarpaddingov(NULL);
|
||||||
resetbarpaddingh(NULL);
|
resetbarpaddingoh(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
resetbarpaddingv(const Arg *arg)
|
resetbarpaddingov(const Arg *arg)
|
||||||
{
|
{
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
vp = (barposition == 1) ? barpaddingv : - barpaddingv;
|
vp = (barposition == 1) ? barpaddingov : - barpaddingov;
|
||||||
|
|
||||||
updatebarpos(selmon);
|
updatebarpos(selmon);
|
||||||
for (bar = selmon->bar; bar; bar = bar->next)
|
for (bar = selmon->bar; bar; bar = bar->next)
|
||||||
|
@ -3049,10 +3049,10 @@ resetbarpaddingv(const Arg *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
resetbarpaddingh(const Arg *arg)
|
resetbarpaddingoh(const Arg *arg)
|
||||||
{
|
{
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
sp = barpaddingh;
|
sp = barpaddingoh;
|
||||||
|
|
||||||
updatebarpos(selmon);
|
updatebarpos(selmon);
|
||||||
for (bar = selmon->bar; bar; bar = bar->next)
|
for (bar = selmon->bar; bar; bar = bar->next)
|
||||||
|
@ -3063,12 +3063,12 @@ resetbarpaddingh(const Arg *arg)
|
||||||
void
|
void
|
||||||
togglebarpadding(const Arg *arg)
|
togglebarpadding(const Arg *arg)
|
||||||
{
|
{
|
||||||
togglebarpaddingv(arg);
|
togglebarpaddingov(arg);
|
||||||
togglebarpaddingh(arg);
|
togglebarpaddingoh(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
togglebarpaddingv(const Arg *arg)
|
togglebarpaddingov(const Arg *arg)
|
||||||
{
|
{
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
/* if its more than 1, disable padding, else enable padding */
|
/* if its more than 1, disable padding, else enable padding */
|
||||||
|
@ -3088,7 +3088,7 @@ togglebarpaddingv(const Arg *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
togglebarpaddingh(const Arg *arg)
|
togglebarpaddingoh(const Arg *arg)
|
||||||
{
|
{
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
/* if its more than 1, disable padding, else enable padding */
|
/* if its more than 1, disable padding, else enable padding */
|
||||||
|
@ -3109,12 +3109,12 @@ togglebarpaddingh(const Arg *arg)
|
||||||
void
|
void
|
||||||
setbarpadding(const Arg *arg)
|
setbarpadding(const Arg *arg)
|
||||||
{
|
{
|
||||||
setbarpaddingv(arg);
|
setbarpaddingov(arg);
|
||||||
setbarpaddingh(arg);
|
setbarpaddingoh(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
setbarpaddingv(const Arg *arg)
|
setbarpaddingov(const Arg *arg)
|
||||||
{
|
{
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
|
|
||||||
|
@ -3140,7 +3140,7 @@ setbarpaddingv(const Arg *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
setbarpaddingh(const Arg *arg)
|
setbarpaddingoh(const Arg *arg)
|
||||||
{
|
{
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
|
|
||||||
|
@ -3173,7 +3173,7 @@ setbarheight(const Arg *arg)
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
|
|
||||||
if (bh < drw->font->h)
|
if (bh < drw->font->h)
|
||||||
bh = drw->font->h;
|
bh = drw->font->h + barpaddingiv;
|
||||||
|
|
||||||
updatebarpos(selmon);
|
updatebarpos(selmon);
|
||||||
for (bar = selmon->bar; bar; bar = bar->next)
|
for (bar = selmon->bar; bar; bar = bar->next)
|
||||||
|
@ -3185,8 +3185,8 @@ setbarheight(const Arg *arg)
|
||||||
void
|
void
|
||||||
setbpgaps(const Arg *arg)
|
setbpgaps(const Arg *arg)
|
||||||
{
|
{
|
||||||
setbarpaddingv(arg);
|
setbarpaddingov(arg);
|
||||||
setbarpaddingh(arg);
|
setbarpaddingoh(arg);
|
||||||
incrgaps(arg);
|
incrgaps(arg);
|
||||||
|
|
||||||
updatebarpos(selmon);
|
updatebarpos(selmon);
|
||||||
|
@ -3197,15 +3197,15 @@ setbpgaps(const Arg *arg)
|
||||||
void
|
void
|
||||||
resetbpgaps(const Arg *arg)
|
resetbpgaps(const Arg *arg)
|
||||||
{
|
{
|
||||||
resetbarpaddingh(arg);
|
resetbarpaddingoh(arg);
|
||||||
resetbarpaddingv(arg);
|
resetbarpaddingov(arg);
|
||||||
defaultgaps(arg);
|
defaultgaps(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
resetbarheight(const Arg *arg)
|
resetbarheight(const Arg *arg)
|
||||||
{
|
{
|
||||||
bh = drw->font->h + barheight;
|
bh = drw->font->h + barheight + barpaddingiv;
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
|
|
||||||
updatebarpos(selmon);
|
updatebarpos(selmon);
|
||||||
|
@ -5147,12 +5147,12 @@ setup(void)
|
||||||
drw = drw_create(dpy, screen, root, tw, sh, visual, depth, cmap);
|
drw = drw_create(dpy, screen, root, tw, sh, visual, depth, cmap);
|
||||||
if (!drw_font_create(drw, font))
|
if (!drw_font_create(drw, font))
|
||||||
die("no fonts could be loaded.");
|
die("no fonts could be loaded.");
|
||||||
lrpad = drw->font->h;
|
lrpad = drw->font->h + barpaddingih;
|
||||||
bh = drw->font->h + barheight;
|
bh = drw->font->h + barheight + barpaddingiv;
|
||||||
|
|
||||||
/* barpadding */
|
/* barpadding */
|
||||||
sp = barpaddingh;
|
sp = barpaddingoh;
|
||||||
vp = (barposition == 1) ? barpaddingv : - barpaddingv;
|
vp = (barposition == 1) ? barpaddingov : - barpaddingov;
|
||||||
|
|
||||||
updategeom();
|
updategeom();
|
||||||
|
|
||||||
|
|
|
@ -113,8 +113,10 @@ ResourcePref resources[] = {
|
||||||
{ "client.swallow", INTEGER, &swallowclients },
|
{ "client.swallow", INTEGER, &swallowclients },
|
||||||
{ "client.swallowfloating", INTEGER, &swallowfloating },
|
{ "client.swallowfloating", INTEGER, &swallowfloating },
|
||||||
{ "bar.height", INTEGER, &barheight },
|
{ "bar.height", INTEGER, &barheight },
|
||||||
{ "bar.paddingv", INTEGER, &barpaddingv },
|
{ "bar.paddingov", INTEGER, &barpaddingov },
|
||||||
{ "bar.paddingh", INTEGER, &barpaddingh },
|
{ "bar.paddingoh", INTEGER, &barpaddingoh },
|
||||||
|
{ "bar.paddingiv", INTEGER, &barpaddingiv },
|
||||||
|
{ "bar.paddingih", INTEGER, &barpaddingih },
|
||||||
{ "stack.centerfloating", INTEGER, ¢erfloating },
|
{ "stack.centerfloating", INTEGER, ¢erfloating },
|
||||||
{ "client.savefloat", INTEGER, &savefloat },
|
{ "client.savefloat", INTEGER, &savefloat },
|
||||||
{ "cursor.warp", INTEGER, &warpcursor },
|
{ "cursor.warp", INTEGER, &warpcursor },
|
||||||
|
|
Loading…
Reference in a new issue